• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.5.8/xnu-1228.15.4/bsd/net/

Lines Matching refs:rtm

302 	struct rt_msghdr *rtm = NULL;
328 if (len < sizeof(*rtm) ||
333 R_Malloc(rtm, struct rt_msghdr *, len);
334 if (rtm == NULL) {
338 m_copydata(m, 0, len, (caddr_t)rtm);
339 if (rtm->rtm_version != RTM_VERSION) {
348 if (rtm->rtm_type == RTM_GET_SILENT) {
352 rtm->rtm_type = RTM_GET;
359 if (rtm->rtm_type != RTM_GET && (so->so_state & SS_PRIV) == 0) {
364 rtm->rtm_pid = proc_selfpid();
365 info.rti_addrs = rtm->rtm_addrs;
366 if (rt_xaddrs((caddr_t)(rtm + 1), len + (caddr_t)rtm, &info)) {
412 if (rtm->rtm_flags & RTF_IFSCOPE) {
416 ifscope = rtm->rtm_index;
419 switch (rtm->rtm_type) {
454 netmask, rtm->rtm_flags, &saved_nrt, ifscope);
488 rt_setmetrics(rtm->rtm_inits,
489 &rtm->rtm_rmx, &saved_nrt->rt_rmx);
490 saved_nrt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
492 (rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
500 gate, netmask, rtm->rtm_flags, &saved_nrt, ifscope);
521 switch(rtm->rtm_type) {
530 if (rtm->rtm_addrs & (RTA_IFP | RTA_IFA)) {
538 rtm->rtm_index = ifp->if_index;
544 len = rt_msg2(rtm->rtm_type, &info, (caddr_t)0,
546 if (len > rtm->rtm_msglen) {
552 Bcopy(rtm, new_rtm, rtm->rtm_msglen);
553 R_Free(rtm); rtm = new_rtm;
555 (void)rt_msg2(rtm->rtm_type, &info, (caddr_t)rtm,
557 rtm->rtm_flags = rt->rt_flags;
558 rtm->rtm_rmx = rt->rt_rmx;
559 rtm->rtm_addrs = info.rti_addrs;
587 rt_setmetrics(rtm->rtm_inits, &rtm->rtm_rmx,
600 rt->rt_rmx.rmx_locks &= ~(rtm->rtm_inits);
602 (rtm->rtm_inits & rtm->rtm_rmx.rmx_locks);
611 if (rtm) {
613 rtm->rtm_errno = error;
615 rtm->rtm_flags |= RTF_DONE;
628 if (rtm)
629 R_Free(rtm);
636 if (rtm) {
637 m_copyback(m, 0, rtm->rtm_msglen, (caddr_t)rtm);
638 if (m->m_pkthdr.len < rtm->rtm_msglen) {
641 } else if (m->m_pkthdr.len > rtm->rtm_msglen)
642 m_adj(m, rtm->rtm_msglen - m->m_pkthdr.len);
643 R_Free(rtm);
814 struct rt_msghdr *rtm;
853 rtm = mtod(m, struct rt_msghdr *);
854 bzero((caddr_t)rtm, len);
867 rtm->rtm_msglen = len;
868 rtm->rtm_version = RTM_VERSION;
869 rtm->rtm_type = type;
949 struct rt_msghdr *rtm = (struct rt_msghdr *)cp0;
951 rtm->rtm_version = RTM_VERSION;
952 rtm->rtm_type = type;
953 rtm->rtm_msglen = len;
967 struct rt_msghdr *rtm;
978 rtm = mtod(m, struct rt_msghdr *);
979 rtm->rtm_flags = RTF_DONE | flags;
980 rtm->rtm_errno = error;
981 rtm->rtm_addrs = rtinfo->rti_addrs;
1056 struct rt_msghdr *rtm;
1065 rtm = mtod(m, struct rt_msghdr *);
1066 rtm->rtm_index = ifp->if_index;
1067 rtm->rtm_flags |= rt->rt_flags;
1068 rtm->rtm_errno = error;
1069 rtm->rtm_addrs = info.rti_addrs;
1133 struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem;
1135 rtm->rtm_flags = rt->rt_flags;
1136 rtm->rtm_use = rt->rt_use;
1137 rtm->rtm_rmx = rt->rt_rmx;
1138 rtm->rtm_index = rt->rt_ifp->if_index;
1139 rtm->rtm_pid = 0;
1140 rtm->rtm_seq = 0;
1141 rtm->rtm_errno = 0;
1142 rtm->rtm_addrs = info.rti_addrs;
1143 error = SYSCTL_OUT(w->w_req, (caddr_t)rtm, size);
1149 struct rt_msghdr2 *rtm = (struct rt_msghdr2 *)w->w_tmem;
1151 rtm->rtm_flags = rt->rt_flags;
1152 rtm->rtm_use = rt->rt_use;
1153 rtm->rtm_rmx = rt->rt_rmx;
1154 rtm->rtm_index = rt->rt_ifp->if_index;
1155 rtm->rtm_refcnt = rt->rt_refcnt;
1157 rtm->rtm_parentflags = rt->rt_parent->rt_flags;
1159 rtm->rtm_parentflags = 0;
1160 rtm->rtm_reserved = 0;
1161 rtm->rtm_addrs = info.rti_addrs;
1162 error = SYSCTL_OUT(w->w_req, (caddr_t)rtm, size);