From f76e492f6dfbd579c3522f6e324fde5b1c468b40 Mon Sep 17 00:00:00 2001 From: glebius Date: Thu, 18 Sep 2014 09:54:57 +0000 Subject: Add if_inc_counter(), a generic method to update ifnet(9) counter w/o dereferencing the struct. Sponsored by: Netflix Sponsored by: Nginx, Inc. --- sys/net/if_var.h | 1 + 1 file changed, 1 insertion(+) (limited to 'sys/net/if_var.h') diff --git a/sys/net/if_var.h b/sys/net/if_var.h index 09f41b8..9490631 100644 --- a/sys/net/if_var.h +++ b/sys/net/if_var.h @@ -528,6 +528,7 @@ void if_register_com_alloc(u_char type, if_com_alloc_t *a, if_com_free_t *f); void if_deregister_com_alloc(u_char type); void if_data_copy(struct ifnet *, struct if_data *); uint64_t if_get_counter_compat(struct ifnet *, ifnet_counter); +void if_inc_counter(struct ifnet *, ifnet_counter, int64_t); #define IF_LLADDR(ifp) \ LLADDR((struct sockaddr_dl *)((ifp)->if_addr->ifa_addr)) -- cgit v1.1