Click here to Skip to main content
13,708,072 members
Rate this:
 
Please Sign up or sign in to vote.
See more:
am working in my project ( graduation project ) and i was wondering if is it possible to use a phone or a laptop as an access point (to act like a router /switch ) and use an other laptop to work with onos and create my own app and an other one (laptop) to be the client that wants to access a server the question is it is possible ? and if it is does the labtop where i installed onos can be the server that the client wants to access ( i need to check if my app is working ) well am kind of lost to be honest

what i wanna do is this a client (host) wants to access into some data stored in a server to do that the host / client sends a packet that contains a txt file (data) that onos intercept and read and the do like an access control thing and send to that client / host a packet that contains a file with a key that will alow him to access the server . hope u can understand what i mean i'll be waiting please help please


What I have tried:

public void envoidonnees(Ethernet ethPkt, DeviceId deviceId) {
    HostId srcId = HostId.hostId(ethPkt.getSourceMAC());
    HostId dstId = HostId.hostId(ethPkt.getDestinationMAC());
    Host dst = hostService.getHost(dstId);

    envoipktadst(ethPkt, deviceId, dst);
}

private void envoipktadst (Ethernet packet, DeviceId deviceId, Host dst) {

    TrafficTreatment treatment = DefaultTrafficTreatment.builder().setOutput(dst.location().port()).build();
    OutboundPacket outboundPacket = new DefaultOutboundPacket(deviceId, treatment,
            ByteBuffer.wrap(packet.serialize()));
            packetService.emit(outboundPacket);
}
Posted 14-May-18 9:27am
Updated 14-May-18 9:28am

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Cookies | Terms of Service
Web05-2016 | 2.8.180920.1 | Last Updated 14 May 2018
Copyright © CodeProject, 1999-2018
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100