hadjer_mohamedi Ответов: 0

Как использовать сокет в приложении безопасности onos , могу ли я использовать ноутбуки для тестирования своего приложения ( например, реальной топологии)?


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


Что я уже пробовал:

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);
}

0 Ответов