Lines Matching refs:interface
50 struct interface *ifnet;
53 * Acceptable sizes (in number of interfaces) for the interface hash
54 * tables. These must all be prime. The interface hash tables all
94 boolean_t have_ripv1_out; /* have a RIPv1 interface */
97 static void if_bad(struct interface *, boolean_t);
98 static boolean_t addrouteforif(struct interface *);
99 static int get_if_kstats(struct interface *, struct phyi_data *);
106 * Table of all interfaces, hashed by interface address. For remote
110 NULL, ahash, offsetof(struct interface, int_ahash),
111 offsetof(struct interface, int_addr),
114 * Table of broadcast capable interfaces, hashed by interface broadcast
118 NULL, ahash, offsetof(struct interface, int_bhash),
119 offsetof(struct interface, int_brdaddr),
123 * hashed by interface index.
130 * Table of all interfaces, hashed by interface name.
133 NULL, nhash, offsetof(struct interface, int_nhash),
134 offsetof(struct interface, int_name),
138 struct interface dummy_ifp;
240 /* allocate the interface hash tables */
253 BADERR(_B_FALSE, "Unable to allocate interface tables");
278 * functional, yet crowded, interface table.
281 msglog("%sunable to grow interface hash table: %s",
310 /* Link a new interface into the lists and hash tables. */
312 if_link(struct interface *ifp, uint32_t ifindex)
316 link_in((void **)&ifnet, ifp, offsetof(struct interface, int_link));
346 offsetof(struct interface, int_ilist));
351 /* Find the interface with an address */
352 struct interface *
357 struct interface *ifp, *possible = NULL;
391 /* find the interface with the specified name ("hme0" for example) */
392 struct interface *
395 struct interface *ifp;
405 * If there is no known interface, maybe there is a
406 * new interface. So just once look for new interfaces.
414 /* Return physical interface with the specified name */
434 struct interface *
437 struct interface *ifp;
448 struct interface *
451 struct interface *ifp;
463 * Return the first interface with the given index.
465 struct interface *
479 * If there is no known interface, maybe there is a
480 * new interface. So just once look for new interfaces.
495 addr_on_ifp(in_addr_t addr, struct interface *ifp,
496 struct interface **best)
498 struct interface *p_best = *best;
501 * Don't use a duplicate interface since it is unusable for output.
532 * Find an interface which should be receiving packets sent from the
534 * interface a packet came in on. Also used for finding out which
535 * interface points towards the gateway of static routes learned from
538 struct interface *
541 struct interface *ifp, *maybe;
553 * If there is no known interface, maybe there is a
554 * new interface. So just once look for new interfaces.
571 * on the given interface for a given network.
572 * If no interface is specified, look for the best fitting interface.
576 const struct interface *ifp) /* as seen on this interface */
586 * If the target network is that of the associated interface
587 * on which it arrived, then use the netmask of the interface.
595 * to have the same network number of an interface, use the
596 * netmask of that interface. If there is more than one
597 * such interface, prefer the interface with the longest
636 const struct interface *ifp) /* as seen on this interface */
680 * Find an existing interface which has the given parameters, but don't
681 * return the interface with name "name" if "name" is specified.
683 struct interface *
684 check_dup(const char *name, /* Don't return this interface */
691 struct interface *best_ifp = NULL;
692 struct interface *ifp;
698 /* This interface, not a duplicate. */
703 * Find an interface which isn't already a duplicate to
746 check_remote(struct interface *ifp)
773 /* Delete an interface. */
775 ifdel(struct interface *ifp)
785 /* unlink the interface */
786 link_out(ifp, offsetof(struct interface, int_link));
794 link_out(ifp, offsetof(struct interface, int_ilist));
802 * If this is a lead interface, then check first for
803 * duplicates of this interface with an eye towards promoting
816 /* Rewire routes with the replacement interface */
862 * Zap all routes associated with this interface.
863 * Assume routes just using gateways beyond this interface
876 /* Mark an interface ill. */
878 if_sick(struct interface *ifp, boolean_t recurse)
880 struct interface *ifp1;
889 /* If an interface is sick, so are its aliases. */
900 /* Mark an interface dead. */
902 if_bad(struct interface *ifp, boolean_t recurse)
904 struct interface *ifp1;
920 /* If an interface is bad, so are its aliases. */
960 /* Mark an interface alive */
962 if_ok(struct interface *ifp, const char *type, boolean_t recurse)
964 struct interface *ifp1;
981 /* Also mark all aliases of this interface as ok */
999 remote_address_ok(struct interface *ifp, in_addr_t addr)
1031 struct interface ifs, *ifp, *ifp1;
1059 /* Fetch the size of the current interface list */
1078 * the interface status of potential interfaces which may have
1139 "unable to get interface flags for %s: %s",
1160 /* Ignore interface with IPv4 link local address. */
1164 /* Get the interface index. */
1275 /* Get interface metric, if possible. */
1344 * If this interface duplicates another, mark it
1370 * See if this is a familiar interface.
1396 * a changed interface.
1398 trace_act("interface %s has changed",
1410 "interface %s to %s turned off",
1418 trace_act("interface %s has been off"
1435 * see if the interface is broken.
1452 * If the interface just awoke, restart the counters.
1467 * wrap, the interface is reset, or if there are
1483 * an interface results in errors. Require
1489 trace_act("interface %s to %s"
1500 "interface %s to %s broken:"
1517 * This is a new interface.
1675 trace_act("interface %s has disappeared",
1686 * If we ever have a RIPv1 interface, assume we always will.
1768 check_net_syn(struct interface *ifp)
1775 * for this interface only if we are running RIPv1 on some other
1776 * interface that is on a different class-A,B,or C network.
1812 * Add route for interface if not currently installed.
1816 static boolean_t /* _B_FALSE=bad interface */
1817 addrouteforif(struct interface *ifp)
1838 * If the interface on a subnet, then install a RIPv1 route to
1870 * We are finished if the correct main interface route exists.
1871 * The right route must be for the right interface, not synthesized
1891 trace_act("re-installing interface %s;"
1924 get_if_kstats(struct interface *ifp, struct phyi_data *newdata)
1962 /* The loopback interface does not keep track of errors */
1982 * have more than one forwarding interface and this is one of the
1987 should_supply(struct interface *ifp)