* 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. */
| 3938 | * static string works well. |
| 3939 | */ |
| 3940 | void |
| 3941 | if_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 | |
| 3951 | int |
| 3952 | if_printf(struct ifnet *ifp, const char *fmt, ...) |
no test coverage detected