Lines Matching refs:route
51 #include <net/route.h>
284 struct rtentry route;
288 (void) memset(&route, 0, sizeof (route));
290 /* route destination is "default" - zero */
292 sin = (struct sockaddr_in *)&route.rt_dst;
296 sin = (struct sockaddr_in *)&route.rt_gateway;
300 route.rt_flags = RTF_GATEWAY | RTF_UP;
306 if (ioctl(s, SIOCADDRT, (char *)&route) == -1) {
307 perror("add default route");