Lines Matching full:interface
46 static struct interface *ahash_tbl[AHASH_LEN];
50 static struct interface *bhash_tbl[BHASH_LEN];
53 /* hash for physical interface names.
58 static struct interface *nhash_tbl[NHASH_LEN];
72 int have_ripv1_out; /* have a RIPv1 interface */
76 static void if_bad(struct interface *);
77 static int addrouteforif(struct interface *);
79 static struct interface**
92 /* Link a new interface into the lists and hash tables.
95 if_link(struct interface *ifp) in if_link()
97 struct interface **hifp; in if_link()
131 /* Find the interface with an address
133 struct interface *
138 struct interface *ifp, *possible = NULL; in ifwithaddr()
169 /* find the interface with a name
171 static struct interface *
175 struct interface *ifp; in ifwithname()
181 * for the interface with the target name and address. in ifwithname()
189 /* If there is no known interface, maybe there is a in ifwithname()
190 * new interface. So just once look for new interfaces. in ifwithname()
199 struct interface *
203 struct interface *ifp; in ifwithindex()
211 /* If there is no known interface, maybe there is a in ifwithindex()
212 * new interface. So just once look for new interfaces. in ifwithindex()
222 /* Find an interface from which the specified address
224 * interface a packet came in on.
226 struct interface *
229 struct interface *ifp, *maybe; in iflookup()
258 /* If there is no known interface, maybe there is a in iflookup()
259 * new interface. So just once look for new interfaces. in iflookup()
284 * on the given interface for a given network.
285 * If no interface is specified, look for the best fitting interface.
289 struct interface *ifp) /* as seen on this interface */ in ripv1_mask_net()
298 /* If the target network is that of the associated interface in ripv1_mask_net()
299 * on which it arrived, then use the netmask of the interface. in ripv1_mask_net()
306 * to have the same network number of an interface, use the in ripv1_mask_net()
307 * netmask of that interface. If there is more than one in ripv1_mask_net()
308 * such interface, prefer the interface with the longest in ripv1_mask_net()
340 struct interface *ifp) /* as seen on this interface */ in ripv1_mask_host()
373 /* See a new interface duplicates an existing interface.
375 struct interface *
381 struct interface *ifp; in check_dup()
409 check_remote(struct interface *ifp) in check_remote()
436 /* Delete an interface.
439 ifdel(struct interface *ifp) in ifdel()
441 struct interface *ifp1; in ifdel()
464 /* delete aliases when the main interface dies in ifdel()
502 /* Zap all routes associated with this interface. in ifdel()
503 * Assume routes just using gateways beyond this interface in ifdel()
516 /* Mark an interface ill.
519 if_sick(struct interface *ifp) in if_sick()
531 /* Mark an interface dead.
534 if_bad(struct interface *ifp) in if_bad()
536 struct interface *ifp1; in if_bad()
563 /* Mark an interface alive
566 if_ok(struct interface *ifp, in if_ok()
569 struct interface *ifp1; in if_ok()
649 struct interface ifs, ifs0, *ifp, *ifp1; in ifinit()
673 /* Fetch the interface list, without too many system calls in ifinit()
740 /* Prepare for the next address of this interface, which in ifinit()
860 /* Use a minimum metric of one. Treat the interface metric in ifinit()
864 * interface addresses is wrong. It is not set by the in ifinit()
888 /* See if this is a familiar interface. in ifinit()
912 * a changed interface. in ifinit()
914 trace_act("interface %s has changed", in ifinit()
932 msglog("interface %s to %s turned off", in ifinit()
939 trace_act("interface %s has been off" in ifinit()
956 * see if the interface is broken. in ifinit()
965 /* If the interface just awoke, restart the counters. in ifinit()
974 * counters wrap or the interface is reset. in ifinit()
993 trace_act("interface %s to %s" in ifinit()
1003 msglog("interface %s to %s broken:" in ifinit()
1020 /* This is a new interface. in ifinit()
1026 /* If it duplicates an existing interface, in ifinit()
1071 ifp = (struct interface *)rtmalloc(sizeof(*ifp), "ifinit ifp"); in ifinit()
1163 trace_act("interface %s has disappeared", in ifinit()
1173 /* If we ever have a RIPv1 interface, assume we always will. in ifinit()
1250 check_net_syn(struct interface *ifp) in check_net_syn()
1257 * for this interface only if we are running RIPv1 on some other in check_net_syn()
1258 * interface that is on a different class-A,B,or C network. in check_net_syn()
1292 /* Add route for interface if not currently installed.
1296 static int /* 0=bad interface */
1297 addrouteforif(struct interface *ifp) in addrouteforif()
1309 /* If the interface on a subnet, then install a RIPv1 route to in addrouteforif()
1333 /* We are finished if the correct main interface route exists. in addrouteforif()
1334 * The right route must be for the right interface, not synthesized in addrouteforif()
1355 trace_act("re-install interface %s", in addrouteforif()