ip6_mroute.h (62587) | ip6_mroute.h (78064) |
---|---|
1/* $FreeBSD: head/sys/netinet6/ip6_mroute.h 62587 2000-07-04 16:35:15Z itojun $ */ 2/* $KAME: ip6_mroute.h,v 1.10 2000/05/19 02:38:53 itojun Exp $ */ | 1/* $FreeBSD: head/sys/netinet6/ip6_mroute.h 78064 2001-06-11 12:39:29Z ume $ */ 2/* $KAME: ip6_mroute.h,v 1.17 2001/02/10 02:05:52 itojun Exp $ */ |
3 4/* 5 * Copyright (C) 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 63 unchanged lines hidden (view full) --- 74 */ 75typedef u_short mifi_t; /* type of a mif index */ 76#define MAXMIFS 64 77 78#ifndef IF_SETSIZE 79#define IF_SETSIZE 256 80#endif 81 | 3 4/* 5 * Copyright (C) 1998 WIDE Project. 6 * All rights reserved. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: --- 63 unchanged lines hidden (view full) --- 74 */ 75typedef u_short mifi_t; /* type of a mif index */ 76#define MAXMIFS 64 77 78#ifndef IF_SETSIZE 79#define IF_SETSIZE 256 80#endif 81 |
82typedef long if_mask; | 82typedef u_int32_t if_mask; |
83#define NIFBITS (sizeof(if_mask) * NBBY) /* bits per mask */ 84 85#ifndef howmany 86#define howmany(x, y) (((x) + ((y) - 1)) / (y)) 87#endif 88 89typedef struct if_set { | 83#define NIFBITS (sizeof(if_mask) * NBBY) /* bits per mask */ 84 85#ifndef howmany 86#define howmany(x, y) (((x) + ((y) - 1)) / (y)) 87#endif 88 89typedef struct if_set { |
90 fd_mask ifs_bits[howmany(IF_SETSIZE, NIFBITS)]; | 90 if_mask ifs_bits[howmany(IF_SETSIZE, NIFBITS)]; |
91} if_set; 92 93#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS))) 94#define IF_CLR(n, p) ((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS))) 95#define IF_ISSET(n, p) ((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS))) 96#define IF_COPY(f, t) bcopy(f, t, sizeof(*(f))) 97#define IF_ZERO(p) bzero(p, sizeof(*(p))) 98 --- 179 unchanged lines hidden --- | 91} if_set; 92 93#define IF_SET(n, p) ((p)->ifs_bits[(n)/NIFBITS] |= (1 << ((n) % NIFBITS))) 94#define IF_CLR(n, p) ((p)->ifs_bits[(n)/NIFBITS] &= ~(1 << ((n) % NIFBITS))) 95#define IF_ISSET(n, p) ((p)->ifs_bits[(n)/NIFBITS] & (1 << ((n) % NIFBITS))) 96#define IF_COPY(f, t) bcopy(f, t, sizeof(*(f))) 97#define IF_ZERO(p) bzero(p, sizeof(*(p))) 98 --- 179 unchanged lines hidden --- |