c - Receiving Ethernet frames from an UDP port -
i need listen on multiple udp ports , process received datagrams ethernet frames. cannot think of other solution creating sock_raw socket receive ethernet frames, check if received udp datagram , extract datagram identify udp port.
is there better way? there kind of socket let me receive udp datagrams on specific port , still access whole ethernet frame?
i suggest use pcap library. it's not hard , it's portable between wide area of systems. can filter , capture want.
libpcap , winpcap provide packet-capture , filtering engines of many open source , commercial network tools, including protocol analyzers (packet sniffers), network monitors, network intrusion detection systems, traffic-generators , network-testers.
another suggestions libcrafter high-level packet creator , decoder. though it's c++ only.
Comments
Post a Comment