Lines Matching refs:socket

6 socket interface on 2.4/2.6/3.x kernels. This type of sockets is used for
74 [setup] socket() -------> creation of the capture socket
82 [shutdown] close() --------> destruction of the capture socket and
87 socket creation and destruction is straight forward, and is done
90 int fd = socket(PF_PACKET, mode, htons(ETH_P_ALL));
98 The destruction of the socket and all associated resources
101 Similarly as without PACKET_MMAP, it is possible to use one socket
115 [setup] socket() -------> creation of the transmission socket
118 bind() ---------> bind transmission socket with a network interface
128 [shutdown] close() --------> destruction of the transmission socket and
134 int fd = socket(PF_PACKET, mode, 0);
137 via this socket, which avoids an expensive call to packet_rcv().
141 Binding the socket to your network interface is mandatory (with zero copy) to
155 bind() associates the socket to your network interface thanks to
167 ioctl(this->socket, SIOCGIFINDEX, &s_ifr);
174 /* bind socket to eth0 */
175 bind(this->socket, (struct sockaddr *)&my_addr, sizeof(struct sockaddr_ll));
182 So, whatever you choose for the socket mode (SOCK_DGRAM or SOCK_RAW),
367 All memory allocations are not freed until the socket is closed. The memory
422 To use one socket for capture and transmission, the mapping of both the
458 be read with recvfrom is limited like a normal socket.
459 See the SO_RCVBUF option in the socket (7) man page.
521 retval = send(this->socket, NULL, 0, 0);
588 - PACKET_FANOUT_HASH: schedule to socket by skb's packet hash
589 - PACKET_FANOUT_LB: schedule to socket by round-robin
590 - PACKET_FANOUT_CPU: schedule to socket by CPU packet arrives on
591 - PACKET_FANOUT_RND: schedule to socket by random selection
592 - PACKET_FANOUT_ROLLOVER: if one socket is full, rollover to another
593 - PACKET_FANOUT_QM: schedule to socket by skbs recorded queue_mapping
605 #include <sys/socket.h>
627 int err, fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_IP));
633 perror("socket");
774 #include <sys/socket.h>
814 fd = socket(AF_PACKET, SOCK_RAW, htons(ETH_P_ALL));
816 perror("socket");
991 fashion as pktgen does, you might set the following option after socket
1060 - Packet sockets work well together with Linux socket filters, thus you also