Click here to Skip to main content
15,896,557 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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:

Java
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
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)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900