MCPcopy Create free account
hub / github.com/F-Stack/f-stack / pfi_unmask

Function pfi_unmask

freebsd/netpfil/pf/pf_if.c:932–949  ·  view source on GitHub ↗

from pf_print_state.c */

Source from the content-addressed store, hash-verified

930
931/* from pf_print_state.c */
932static int
933pfi_unmask(void *addr)
934{
935 struct pf_addr *m = addr;
936 int i = 31, j = 0, b = 0;
937 u_int32_t tmp;
938
939 while (j < 4 && m->addr32[j] == 0xffffffff) {
940 b += 32;
941 j++;
942 }
943 if (j < 4) {
944 tmp = ntohl(m->addr32[j]);
945 for (i = 31; tmp & (1 << i); --i)
946 b++;
947 }
948 return (b);
949}
950
951static void
952pfi_attach_ifnet_event(void *arg __unused, struct ifnet *ifp)

Callers 2

pfi_dynaddr_setupFunction · 0.85
pfi_instance_addFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected