MCPcopy Index your code
hub / github.com/F-Stack/f-stack / if_initname

Function if_initname

freebsd/net/if.c:3940–3949  ·  view source on GitHub ↗

* The name argument must be a pointer to storage which will last as * long as the interface does. For physical devices, the result of * device_get_name(dev) is a good choice and for pseudo-devices a * static string works well. */

Source from the content-addressed store, hash-verified

3938 * static string works well.
3939 */
3940void
3941if_initname(struct ifnet *ifp, const char *name, int unit)
3942{
3943 ifp->if_dname = name;
3944 ifp->if_dunit = unit;
3945 if (unit != IF_DUNIT_NONE)
3946 snprintf(ifp->if_xname, IFNAMSIZ, "%s%d", name, unit);
3947 else
3948 strlcpy(ifp->if_xname, name, IFNAMSIZ);
3949}
3950
3951int
3952if_printf(struct ifnet *ifp, const char *fmt, ...)

Callers 15

pflog_clone_createFunction · 0.85
pfsync_clone_createFunction · 0.85
ipfw_clone_createFunction · 0.85
ipfwlog_clone_createFunction · 0.85
ieee80211_vap_setupFunction · 0.85
add_vifFunction · 0.85
arge_attachFunction · 0.85
are_attachFunction · 0.85
octm_attachFunction · 0.85
octe_attachFunction · 0.85
nlm_xlpge_ifinitFunction · 0.85
add_m6ifFunction · 0.85

Calls 2

snprintfFunction · 0.85
strlcpyFunction · 0.50

Tested by

no test coverage detected