Searched refs:rtm (Results 1 - 25 of 38) sorted by relevance

12

/freebsd-head/usr.sbin/rtsold/
H A Drtsock.c99 struct rt_msghdr *rtm; local
104 offsetof(struct rt_msghdr, rtm_msglen) + sizeof(rtm->rtm_msglen);
110 rtm = (struct rt_msghdr *)(void *)next;
113 len = rtm->rtm_msglen;
119 "rtmsg type %d, len=%lu", rtm->rtm_type,
124 if (rtm->rtm_type != rtsock_dispatch[idx].type)
126 if (rtm->rtm_msglen < rtsock_dispatch[idx].minlen) {
128 "rtmsg type %d too short!", rtm->rtm_type);
132 ret = (*rtsock_dispatch[idx].func)(s, rtm, lim);
141 rtsock_input_ifannounce(int s __unused, struct rt_msghdr *rtm, cha argument
[all...]
/freebsd-head/libexec/bootpd/
H A Drtmsg.c125 struct rt_msghdr *rtm = &(m_rtmsg.m_rtm); local
149 sin = (struct sockaddr_in *)(rtm + 1);
153 !(rtm->rtm_flags & RTF_GATEWAY)) switch (sdl->sdl_type) {
184 struct rt_msghdr *rtm = &m_rtmsg.m_rtm; local
190 rtm->rtm_flags = flags;
191 rtm->rtm_version = RTM_VERSION;
199 rtm->rtm_addrs |= RTA_GATEWAY;
200 rtm->rtm_rmx.rmx_expire = expire_time;
201 rtm->rtm_inits = RTV_EXPIRE;
202 rtm
[all...]
/freebsd-head/lib/libc/net/
H A Dgetifmaddrs.c69 struct rt_msghdr *rtm; local
93 for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
94 rtm = (struct rt_msghdr *)(void *)next;
95 if (rtm->rtm_version != RTM_VERSION)
97 switch (rtm->rtm_type) {
99 ifmam = (struct ifma_msghdr *)(void *)rtm;
129 for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
130 rtm = (struct rt_msghdr *)(void *)next;
131 if (rtm->rtm_version != RTM_VERSION)
134 switch (rtm
[all...]
H A Dgetifaddrs.c92 struct rt_msghdr *rtm; local
137 for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
138 rtm = (struct rt_msghdr *)(void *)next;
139 if (rtm->rtm_version != RTM_VERSION)
141 switch (rtm->rtm_type) {
143 ifm = (struct if_msghdrl *)(void *)rtm;
158 ifam = (struct ifa_msghdrl *)(void *)rtm;
220 for (next = buf; next < buf + needed; next += rtm->rtm_msglen) {
221 rtm = (struct rt_msghdr *)(void *)next;
222 if (rtm
[all...]
/freebsd-head/usr.sbin/arp/
H A Darp.c85 struct rt_msghdr *rtm);
322 struct rt_msghdr *rtm; local
407 rtm = rtmsg(RTM_GET, dst, NULL);
408 if (rtm == NULL) {
412 addr = (struct sockaddr_in *)(rtm + 1);
416 (rtm->rtm_flags & RTF_GATEWAY) ||
467 struct rt_msghdr *rtm; local
480 rtm = rtmsg(RTM_GET, dst, NULL);
481 if (rtm == NULL) {
485 addr = (struct sockaddr_in *)(rtm
532 struct rt_msghdr *rtm; local
588 print_entry(struct sockaddr_dl *sdl, struct sockaddr_in *addr, struct rt_msghdr *rtm) argument
689 nuke_entry(struct sockaddr_dl *sdl __unused, struct sockaddr_in *addr, struct rt_msghdr *rtm) argument
730 struct rt_msghdr *rtm = &m_rtmsg.m_rtm; local
[all...]
/freebsd-head/contrib/netbsd-tests/net/if_loop/
H A Dt_pr.c66 #define rtm m_rtmsg.m_rtm macro
93 rtm.rtm_type = RTM_CHANGE;
94 rtm.rtm_flags = RTF_STATIC;
95 rtm.rtm_version = RTM_VERSION;
96 rtm.rtm_seq = 3;
97 rtm.rtm_inits = RTV_MTU;
98 rtm.rtm_addrs = RTA_DST;
99 rtm.rtm_rmx.rmx_mtu = 100;
100 rtm.rtm_msglen = sizeof(m_rtmsg);
/freebsd-head/sbin/route/
H A Droute.c446 struct rt_msghdr *rtm; local
483 for (next = buf; next < lim; next += rtm->rtm_msglen) {
484 rtm = (struct rt_msghdr *)(void *)next;
486 print_rtmsg(rtm, rtm->rtm_msglen);
487 if ((rtm->rtm_flags & RTF_GATEWAY) == 0)
490 struct sockaddr *sa = (struct sockaddr *)(rtm + 1);
497 rtm->rtm_type = RTM_DELETE;
498 rtm->rtm_seq = seqno;
499 rlen = write(s, next, rtm
1418 struct rt_msghdr *rtm; local
1530 #define rtm macro
1584 #undef rtm macro
1629 print_rtmsg(struct rt_msghdr *rtm, size_t msglen) argument
1732 print_getmsg(struct rt_msghdr *rtm, int msglen, int fib) argument
1812 pmsg_common(struct rt_msghdr *rtm, size_t msglen) argument
[all...]
/freebsd-head/usr.sbin/rtadvd/
H A Dif.c169 struct rt_msghdr *rtm; local
174 for (rtm = (struct rt_msghdr *)buf;
175 rtm < (struct rt_msghdr *)lim;
176 rtm = (struct rt_msghdr *)(((char *)rtm) + rtm->rtm_msglen)) {
178 if (!rtm->rtm_msglen) {
180 "(buf=%p lim=%p rtm=%p)", __func__,
181 buf, lim, rtm);
187 "(buf=%p lim=%p rtm
263 struct rt_msghdr *rtm = (struct rt_msghdr *)buf; local
275 struct rt_msghdr *rtm = (struct rt_msghdr *)buf; local
287 struct rt_msghdr *rtm = (struct rt_msghdr *)buf; local
[all...]
/freebsd-head/usr.sbin/ndp/
H A Dndp.c115 if (rtm->rtm_addrs & (w)) { \
389 register struct rt_msghdr *rtm = &(m_rtmsg.m_rtm); local
430 sin = (struct sockaddr_in6 *)(rtm + 1);
434 !(rtm->rtm_flags & RTF_GATEWAY)) {
495 register struct rt_msghdr *rtm = &m_rtmsg.m_rtm; local
519 sin = (struct sockaddr_in6 *)(rtm + 1);
523 !(rtm->rtm_flags & RTF_GATEWAY)) {
540 rtm->rtm_flags |= RTF_LLDATA;
565 struct rt_msghdr *rtm; local
604 for (next = buf; next && next < lim; next += rtm
841 register struct rt_msghdr *rtm = &m_rtmsg.m_rtm; local
[all...]
/freebsd-head/contrib/bsnmp/snmp_mibII/
H A DmibII_route.c94 mib_sroute_process(struct rt_msghdr *rtm, struct sockaddr *gw, argument
111 if (rtm->rtm_flags & RTF_HOST)
140 if (rtm->rtm_type == RTM_DELETE) {
171 if ((ifp = mib_find_if_sys(rtm->rtm_index)) == NULL) {
172 if (rtm->rtm_type == RTM_ADD) {
174 mib_send_rtmsg(rtm, gw, dst, mask);
188 r->type = (rtm->rtm_flags & RTF_REJECT) ? 2 : 4;
191 r->proto = (rtm->rtm_flags & RTF_LOCAL) ? 2 :
192 (rtm->rtm_flags & RTF_STATIC) ? 3 :
193 (rtm
231 struct rt_msghdr *rtm; local
[all...]
H A DmibII.c1006 process_arp(const struct rt_msghdr *rtm, const struct sockaddr_dl *sdl, argument
1023 if (rtm->rtm_rmx.rmx_expire == 0)
1034 handle_rtmsg(struct rt_msghdr *rtm) argument
1050 if (rtm->rtm_version != RTM_VERSION) {
1051 syslog(LOG_ERR, "Bogus RTM version %u", rtm->rtm_version);
1055 switch (rtm->rtm_type) {
1058 ifamp = (struct ifa_msghdr *)rtm;
1086 ifamp = (struct ifa_msghdr *)rtm;
1101 ifmam = (struct ifma_msghdr *)rtm;
1124 ifmam = (struct ifma_msghdr *)rtm;
1205 mib_send_rtmsg(struct rt_msghdr *rtm, struct sockaddr *gw, struct sockaddr *dst, struct sockaddr *mask) argument
1308 struct rt_msghdr *rtm; local
1371 struct rt_msghdr *rtm; local
1413 struct rt_msghdr *rtm; local
[all...]
/freebsd-head/contrib/ipfilter/ipsend/
H A D44arp.c66 struct rt_msghdr *rtm; local
105 for (next = buf; next < lim; next += rtm->rtm_msglen)
107 rtm = (struct rt_msghdr *)next;
108 sin = (struct sockaddr_in *)(rtm + 1);
/freebsd-head/sys/net/
H A Drtsock.c558 struct rt_msghdr *rtm = NULL; local
585 if (len < sizeof(*rtm) ||
595 if ((rtm = malloc(alloc_len, M_TEMP, M_NOWAIT)) == NULL)
598 m_copydata(m, 0, len, (caddr_t)rtm);
602 if (rtm->rtm_version != RTM_VERSION) {
604 free(rtm, M_TEMP);
605 rtm = NULL;
615 rtm->rtm_pid = curproc->p_pid;
616 info.rti_addrs = rtm->rtm_addrs;
618 info.rti_mflags = rtm
1055 struct rt_msghdr *rtm; local
1143 struct rt_msghdr *rtm = NULL; local
1272 struct rt_msghdr *rtm; local
1392 struct rt_msghdr *rtm; local
1600 struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem; local
[all...]
/freebsd-head/sbin/routed/
H A Dtable.c885 rtm_add(struct rt_msghdr *rtm, argument
894 if (rtm->rtm_flags & RTF_HOST) {
899 msglog("ignore %s without mask", rtm_type_name(rtm->rtm_type));
908 rtm_type_name(rtm->rtm_type));
912 rtm_type_name(rtm->rtm_type),
917 k->k_metric = rtm->rtm_rmx.rmx_hopcount;
926 if (rtm->rtm_flags & RTF_GATEWAY)
928 if (rtm->rtm_flags & RTF_STATIC)
931 if (0 != (rtm->rtm_flags & (RTF_DYNAMIC | RTF_MODIFIED))) {
989 rtm_lose(struct rt_msghdr *rtm, argument
1049 struct rt_msghdr *rtm; local
1163 struct rt_msghdr rtm; member in struct:__anon145::__anon146
[all...]
/freebsd-head/usr.bin/netstat/
H A Droute.c253 struct rt_msghdr *rtm; local
313 for (next = buf; next < lim; next += rtm->rtm_msglen) {
314 rtm = (struct rt_msghdr *)next;
315 if (rtm->rtm_version != RTM_VERSION)
320 sa = (struct sockaddr *)(rtm + 1);
343 p_rtentry_sysctl("rt-entry", rtm);
355 p_rtentry_sysctl(const char *name, struct rt_msghdr *rtm) argument
363 sa = (struct sockaddr *)(rtm + 1);
365 if (rtm->rtm_addrs & (1 << i)) {
373 rtm
[all...]
/freebsd-head/contrib/netbsd-tests/net/config/
H A Dnetconfig.c131 #define rtm m_rtmsg.m_rtm macro
145 rtm.rtm_type = RTM_ADD;
146 rtm.rtm_flags = RTF_UP | RTF_GATEWAY | RTF_STATIC;
147 rtm.rtm_version = RTM_VERSION;
148 rtm.rtm_seq = 2;
149 rtm.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;
176 rtm.rtm_msglen = len;
/freebsd-head/tools/tools/net80211/wlanwatch/
H A Dwlanwatch.c77 static void print_rtmsg(struct rt_msghdr *rtm, int msglen);
287 print_rtmsg(struct rt_msghdr *rtm, int msglen) argument
294 if (rtm->rtm_version != RTM_VERSION) {
296 rtm->rtm_version);
299 switch (rtm->rtm_type) {
301 ifm = (struct if_msghdr *)rtm;
321 ifan = (struct if_announcemsghdr *)rtm;
340 ifan = (struct if_announcemsghdr *)rtm;
/freebsd-head/usr.sbin/ppp/
H A Droute.c311 route_ParseHdr(struct rt_msghdr *rtm, struct sockaddr *sa[RTAX_MAX]) argument
316 wp = (char *)(rtm + 1);
319 if (rtm->rtm_addrs & (1 << rtax)) {
331 struct rt_msghdr *rtm; local
359 for (cp = sp; cp < ep; cp += rtm->rtm_msglen) {
360 rtm = (struct rt_msghdr *)cp;
362 route_ParseHdr(rtm, sa);
368 p_flags(arg->prompt, rtm->rtm_flags, 6);
369 prompt_Printf(arg->prompt, " %s\n", Index2Nam(rtm->rtm_index));
383 struct rt_msghdr *rtm; local
474 struct rt_msghdr *rtm; local
[all...]
/freebsd-head/usr.sbin/route6d/
H A Droute6d.c1700 struct rt_msghdr *rtm; local
1719 if (len < sizeof(*rtm)) {
1721 len, (u_long)sizeof(*rtm));
1745 rtm = NULL;
1773 rtm = (struct rt_msghdr *)(void *)p;
1774 if (rtm->rtm_version != RTM_VERSION) {
1777 rtm->rtm_version, RTM_VERSION);
1784 if (rtm->rtm_type > RTM_RESOLVE) {
1786 rtm->rtm_type);
1789 addrs = rtm
2468 rttypes(struct rt_msghdr *rtm) argument
2503 rtflags(struct rt_msghdr *rtm) argument
2604 struct rt_msghdr *rtm; local
2654 rt_entry(struct rt_msghdr *rtm, int again) argument
2821 struct rt_msghdr *rtm; local
2893 struct rt_msghdr *rtm; local
[all...]
/freebsd-head/sbin/dumpon/
H A Ddumpon.c104 struct rt_msghdr *rtm; local
150 for (next = buf; next < buf + sz; next += rtm->rtm_msglen) {
151 rtm = (struct rt_msghdr *)(void *)next;
152 if (rtm->rtm_version != RTM_VERSION)
154 if ((rtm->rtm_flags & RTF_GATEWAY) == 0 ||
155 rtm->rtm_index != ifindex)
159 sa = (struct sockaddr *)(rtm + 1);
161 if ((rtm->rtm_addrs & (1 << i)) != 0) {
/freebsd-head/tools/tools/net80211/wlanwds/
H A Dwlanwds.c91 static void handle_rtmsg(struct rt_msghdr *rtm, ssize_t msglen);
375 handle_rtmsg(struct rt_msghdr *rtm, ssize_t msglen) argument
379 if (rtm->rtm_version != RTM_VERSION) {
381 rtm->rtm_version);
384 switch (rtm->rtm_type) {
386 ifan = (struct if_announcemsghdr *)rtm;
404 ifan = (struct if_announcemsghdr *)rtm;
/freebsd-head/usr.sbin/wpa/ndis_events/
H A Dndis_events.c278 struct rt_msghdr *rtm; local
335 rtm = (struct rt_msghdr *)msg;
336 if (rtm->rtm_type != RTM_IFINFO)
/freebsd-head/usr.sbin/uhsoctl/
H A Duhsoctl.c881 struct rt_msghdr rtm; member in struct:__anon97
952 r.rtm.rtm_version = RTM_VERSION;
953 r.rtm.rtm_type = RTM_ADD;
954 r.rtm.rtm_flags = RTF_UP | RTF_STATIC;
955 r.rtm.rtm_pid = getpid();
965 r.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY | RTA_NETMASK;
966 r.rtm.rtm_msglen = sizeof(r);
968 n = write(rs, &r, r.rtm.rtm_msglen);
969 if (n != r.rtm.rtm_msglen) {
970 r.rtm
[all...]
/freebsd-head/sys/netinet/
H A Din.c1412 struct rt_msghdr rtm; member in struct:__anon105
1433 arpc.rtm.rtm_msglen = sizeof(arpc);
1434 arpc.rtm.rtm_version = RTM_VERSION;
1435 arpc.rtm.rtm_type = RTM_GET;
1436 arpc.rtm.rtm_flags = RTF_UP;
1437 arpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY;
1441 arpc.rtm.rtm_flags |= RTF_ANNOUNCE;
1456 arpc.rtm.rtm_rmx.rmx_expire =
1458 arpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA);
1460 arpc.rtm
[all...]
/freebsd-head/sys/netinet6/
H A Din6.c2340 struct rt_msghdr rtm; member in struct:__anon809
2367 ndpc.rtm.rtm_msglen = sizeof(ndpc);
2368 ndpc.rtm.rtm_version = RTM_VERSION;
2369 ndpc.rtm.rtm_type = RTM_GET;
2370 ndpc.rtm.rtm_flags = RTF_UP;
2371 ndpc.rtm.rtm_addrs = RTA_DST | RTA_GATEWAY;
2377 ndpc.rtm.rtm_flags |= RTF_ANNOUNCE;
2392 ndpc.rtm.rtm_rmx.rmx_expire = lle->la_expire +
2394 ndpc.rtm.rtm_flags |= (RTF_HOST | RTF_LLDATA);
2396 ndpc.rtm
[all...]

Completed in 382 milliseconds

12