*** UNIX MANUAL PAGE BROWSER ***

A Nergahak database for man pages research.

Navigation

Directory Browser

1Browse 4.4BSD4.4BSD
1Browse Digital UNIXDigital UNIX 4.0e
1Browse FreeBSDFreeBSD 14.3
1Browse MINIXMINIX 3.4.0rc6-d5e4fc0
1Browse NetBSDNetBSD 10.1
1Browse OpenBSDOpenBSD 7.7
1Browse UNIX v7Version 7 UNIX
1Browse UNIX v10Version 10 UNIX

Manual Page Search

Manual Page Result

0 Command: if_get | Section: 9 | Source: OpenBSD | File: if_get.9
IF_GET(9) FreeBSD Kernel Developer's Manual IF_GET(9) NAME if_get, if_unit, if_put - get an interface pointer from an interface index SYNOPSIS #include <net/if.h> struct ifnet * if_get(unsigned int ifidx); struct ifnet * if_unit(const char *name); void if_put(struct ifnet *ifp); DESCRIPTION The if_get() function returns a pointer to the interface descriptor corresponding to the unique index ifidx. This descriptor is guaranteed to be valid until if_put() is called on the returned pointer. The index value 0 is never associated with an interface descriptor and can be used to determine if an interface index is valid or not. The if_unit() function returns a pointer to the interface descriptor corresponding to the unique name name. This descriptor is guaranteed to be valid until if_put() is called on the returned pointer. The if_put() function releases a reference on the interface descriptor pointed by ifp. If ifp is a NULL pointer, no action occurs. CONTEXT if_get(), if_unit() and if_put() can be called during autoconf, from process context, or from interrupt context. RETURN VALUES if_get() returns a pointer to an interface descriptor if the index is valid, otherwise NULL. if_unit() returns a pointer to an interface descriptor if the interface with present name exists, otherwise NULL. FreeBSD 14.1-RELEASE-p8 January 18, 2021 FreeBSD 14.1-RELEASE-p8

Navigation Options