diff options
author | brooks <brooks@FreeBSD.org> | 2002-09-24 17:35:08 +0000 |
---|---|---|
committer | brooks <brooks@FreeBSD.org> | 2002-09-24 17:35:08 +0000 |
commit | d039f38d0d117aa7a539cbc6c6b1fb592050eb12 (patch) | |
tree | 6bb2592d60be2179dc1f63ed27c053dfced72616 /sys/net/if_var.h | |
parent | d73b1f9b7b8eb6c020851d65c60869d788e84828 (diff) | |
download | FreeBSD-src-d039f38d0d117aa7a539cbc6c6b1fb592050eb12.zip FreeBSD-src-d039f38d0d117aa7a539cbc6c6b1fb592050eb12.tar.gz |
Add a new helper function if_printf() modeled on device_printf(). The
function takes a struct ifnet pointer followed by the usual printf
arguments and prints "<interfacename>: " before the results of printf.
Since this is the primary form of printf calls in network device drivers
and accounts for most uses of the ifnet menber if_unit, this
significantly simplifies many printf()s.
Diffstat (limited to 'sys/net/if_var.h')
-rw-r--r-- | sys/net/if_var.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/if_var.h b/sys/net/if_var.h index bd9ebfd..a54ab5b 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -422,6 +422,7 @@ void if_attach(struct ifnet *); int if_delmulti(struct ifnet *, struct sockaddr *); void if_detach(struct ifnet *); void if_down(struct ifnet *); +int if_printf(struct ifnet *, const char *, ...) __printflike(2, 3); void if_route(struct ifnet *, int flag, int fam); int if_setlladdr(struct ifnet *, const u_char *, int); void if_unroute(struct ifnet *, int flag, int fam); |