diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2008-04-18 09:16:15 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2008-04-18 09:16:15 +0000 |
commit | 9490f7792ea055f8deb63b21074eb1e994861753 (patch) | |
tree | 6314ca9a7c3db1e6b3bf70254587530da5564b6c /sys/netinet/if_ether.h | |
parent | add7cd1933b616a68b7facc7786f42ec7a011711 (diff) |
extend the if_ethersubr.c crc functions to support updating a running
crc in addition to the existing "oneshot" mode and use them to replace
ieee80211_crc_update() with the new ether_crc32_le_update(). Saves 1k
kernel bss + some code.
Mark the new ether_crc32_[lb]e_update functions as __pure for a
~25x speedup (on my i386 at least).
feedback and ok damien@
Diffstat (limited to 'sys/netinet/if_ether.h')
-rw-r--r-- | sys/netinet/if_ether.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/netinet/if_ether.h b/sys/netinet/if_ether.h index 342e81eb258..5fd7135d473 100644 --- a/sys/netinet/if_ether.h +++ b/sys/netinet/if_ether.h @@ -1,4 +1,4 @@ -/* $OpenBSD: if_ether.h,v 1.39 2007/05/16 09:24:07 dlg Exp $ */ +/* $OpenBSD: if_ether.h,v 1.40 2008/04/18 09:16:14 djm Exp $ */ /* $NetBSD: if_ether.h,v 1.22 1996/05/11 13:00:00 mycroft Exp $ */ /* @@ -287,6 +287,8 @@ int revarpwhoarewe(struct ifnet *, struct in_addr *, struct in_addr *); int revarpwhoami(struct in_addr *, struct ifnet *); int db_show_arptab(void); +u_int32_t ether_crc32_le_update(u_int32_t crc, const u_int8_t *, size_t); +u_int32_t ether_crc32_be_update(u_int32_t crc, const u_int8_t *, size_t); u_int32_t ether_crc32_le(const u_int8_t *, size_t); u_int32_t ether_crc32_be(const u_int8_t *, size_t); |