Lines Matching refs:rtsock
129 static int rtsock; /* the routing socket */
512 if (FD_ISSET(rtsock, recvecp))
559 close(rtsock);
710 if ((rtsock = socket(PF_ROUTE, SOCK_RAW, 0)) < 0) {
715 set[1].fd = rtsock;
718 if (rtsock > maxfd)
719 maxfd = rtsock;
725 rtsock = -1; /*just for safety */
741 if (rtsock >= 0)
742 FD_SET(rtsock, sockvecp);
1708 if ((len = read(rtsock, buf, sizeof(buf))) < 0) {
1709 perror("read from rtsock");
1716 trace(1, "short read from rtsock: %d (should be > %lu)\n",
1803 trace(1, "rtsock: %s (addrs=%x)\n",
1920 trace(1, "rtsock: reconfigure interfaces, refresh interface routes\n");
1942 trace(1, "rtsock: read routing table again\n");
2866 if (write(rtsock, buf, len) > 0)
2876 trace(0, "Can not write to rtsock (addroute): %s\n",
2879 fprintf(rtlog, "\tCan not write to rtsock: %s\n",
2932 if (write(rtsock, buf, len) >= 0)
2942 trace(0, "Can not write to rtsock (delroute): %s\n",
2945 fprintf(rtlog, "\tCan not write to rtsock: %s\n",
2974 if (write(rtsock, buf, len) < 0) {
2977 perror("write to rtsock");
2981 if ((len = read(rtsock, buf, sizeof(buf))) < 0) {
2982 perror("read from rtsock");