Home | History | Annotate | Download | only in rp-pppoe

Lines Matching refs:sock

147 getHWaddr(int sock, char const *ifname, unsigned char *hwaddr)
158 if (ioctl(sock, SIOCGIFCONF, &ifc) < 0) {
282 int sock;
319 if ((sock = socket(AF_LOCAL, SOCK_DGRAM, 0)) < 0) {
325 if (ioctl(sock, SIOCGIFFLAGS, &ifr) < 0) {
338 getHWaddr(sock, ifname, hwaddr);
344 if (ioctl(sock, SIOCGIFMTU, &ifr) < 0) {
356 if (close(sock) < 0) {
517 * sock -- socket to send to
526 sendPacket(PPPoEConnection *conn, int sock, PPPoEPacket *pkt, int size)
529 if (write(sock, pkt, size) < 0) {
534 if (send(sock, pkt, size, 0) < 0) {
572 dlunitdatareq(sock, addr, dl_addrlen, 0, 0, xmitbuf, data_size);
583 if (sendto(sock, pkt, size, 0, &sa, sizeof(sa)) < 0) {
617 * sock -- socket to read from
626 receivePacket(int sock, PPPoEPacket *pkt, int *size)
634 if ((bpfSize = read(sock, bpfBuffer, bpfLength)) < 0) {
678 if ((retval = getmsg(sock, NULL, &data, &flags)) < 0) {
686 if ((*size = recv(sock, pkt, sizeof(PPPoEPacket), 0)) < 0) {