Displaying 1 result from an estimated 1 matches for "packet_mreq".
2006 Aug 02
0
no PROMISC mode ..
...will know if
there''s another request (so it can handle unsets), and then, if the
process does not need anymore this mode, it will just request to be
removed to that membership, decreasing the counter.
The code nowadays is fairly close to this :
-----
struct packet_mreq mr;
[.....]
memset(&mr,0,sizeof(mr));
mr.mr_ifindex = ifr.ifr_ifindex;
mr.mr_type = PACKET_MR_PROMISC;
setsockopt(sock, SOL_PACKET, PACKET_ADD_MEMBERSHIP, (char
*)&mr, sizeof(mr));
-----
T...