Lines Matching refs:ifp

44 static void		addrouteforif(struct interface *ifp);
64 struct interface *ifp;
102 for (ifp = ifnet; ifp != NULL; ifp = ifp->int_next)
103 ifp->int_flags |= RIP6_IFF_MARKED;
119 ifp = if_ifwithname(lifr.lifr_name);
120 if (ifp != NULL)
121 ifp->int_flags &= ~RIP6_IFF_MARKED;
131 if (ifp != NULL) {
132 if (ifp->int_flags & RIP6_IFF_UP) {
138 ifp->int_transitions++;
141 if_purge(ifp);
221 if (ifp != NULL) {
229 if (ifp->int_prefix_length == ifs.int_prefix_length &&
230 ((ifp->int_flags | RIP6_IFF_NORTEXCH) ==
232 ifp->int_metric == ifs.int_metric &&
233 ifp->int_ifindex == ifs.int_ifindex) {
239 ifp->int_flags |= RIP6_IFF_NORTEXCH;
241 ifp->int_flags &= ~RIP6_IFF_NORTEXCH;
243 if (!(ifp->int_flags & RIP6_IFF_POINTOPOINT) &&
244 IN6_ARE_ADDR_EQUAL(&ifp->int_addr,
247 if ((ifp->int_flags & RIP6_IFF_POINTOPOINT) &&
248 IN6_ARE_ADDR_EQUAL(&ifp->int_dstaddr,
252 if_purge(ifp);
253 if (ifp->int_prefix_length != ifs.int_prefix_length)
255 ifp->int_addr = ifs.int_addr;
256 ifp->int_dstaddr = ifs.int_dstaddr;
257 ifp->int_metric = ifs.int_metric;
262 if (!(ifp->int_flags & RIP6_IFF_UP) &&
264 ifp->int_transitions++;
265 ifp->int_flags |= ifs.int_flags;
266 ifp->int_prefix_length = ifs.int_prefix_length;
272 if (ifp->int_ifindex != ifs.int_ifindex) {
273 if (ifp->int_sock != -1) {
274 resetup_listen_sock(ifp,
277 ifp->int_ifindex = ifs.int_ifindex;
280 ifp->int_mtu = ifs.int_mtu;
285 ifp = (struct interface *)
287 if (ifp == NULL) {
291 *ifp = ifs;
292 ifp->int_name = ifp->int_ifbase = NULL;
293 ifp->int_name =
295 if (ifp->int_name == NULL) {
296 free(ifp);
300 (void) strcpy(ifp->int_name, lifr.lifr_name);
301 ifp->int_ifbase =
303 if (ifp->int_ifbase == NULL) {
304 free(ifp->int_name);
305 free(ifp);
309 (void) strcpy(ifp->int_ifbase, lifr.lifr_name);
310 cp = (char *)index(ifp->int_ifbase, IF_SEPARATOR);
319 free(ifp->int_ifbase);
320 free(ifp->int_name);
321 free(ifp);
324 "not be parsed", ifp->int_name);
332 ifp->int_sock =
333 setup_listen_sock(ifp->int_ifindex);
335 ifp->int_sock = -1;
337 ifp->int_next = ifnet;
338 ifnet = ifp;
339 traceinit(ifp);
341 addrouteforif(ifp);
349 for (ifp = ifnet; ifp != NULL; ifp = ifp->int_next) {
350 if ((ifp->int_flags & (RIP6_IFF_MARKED | RIP6_IFF_UP)) ==
352 if_purge(ifp);
353 ifp->int_flags &= ~RIP6_IFF_MARKED;
364 addrouteforif(struct interface *ifp)
369 if (ifp->int_flags & RIP6_IFF_POINTOPOINT)
370 dst = &ifp->int_dstaddr;
372 dst = &ifp->int_addr;
374 rt = rtlookup(dst, ifp->int_prefix_length);
381 rtadd(dst, &ifp->int_addr, ifp->int_prefix_length, ifp->int_metric, 0,
382 _B_TRUE, ifp);
505 resetup_listen_sock(struct interface *ifp, int newindex)
509 (void) close(ifp->int_sock);
514 if (poll_ifs[i].fd == ifp->int_sock) {
531 ifp->int_sock = setup_listen_sock(newindex);