| @@ -1,13 +1,14 @@ | | | @@ -1,13 +1,14 @@ |
| | | 1 | /* $NetBSD: tcp_vtw.h,v 1.6 2012/11/23 14:48:31 joerg Exp $ */ |
1 | /* | | 2 | /* |
2 | * Copyright (c) 2011 The NetBSD Foundation, Inc. | | 3 | * Copyright (c) 2011 The NetBSD Foundation, Inc. |
3 | * All rights reserved. | | 4 | * All rights reserved. |
4 | * | | 5 | * |
5 | * This code is derived from software contributed to The NetBSD Foundation | | 6 | * This code is derived from software contributed to The NetBSD Foundation |
6 | * by Coyote Point Systems, Inc. | | 7 | * by Coyote Point Systems, Inc. |
7 | * | | 8 | * |
8 | * Redistribution and use in source and binary forms, with or without | | 9 | * Redistribution and use in source and binary forms, with or without |
9 | * modification, are permitted provided that the following conditions | | 10 | * modification, are permitted provided that the following conditions |
10 | * are met: | | 11 | * are met: |
11 | * 1. Redistributions of source code must retain the above copyright | | 12 | * 1. Redistributions of source code must retain the above copyright |
12 | * notice, this list of conditions and the following disclaimer. | | 13 | * notice, this list of conditions and the following disclaimer. |
13 | * 2. Redistributions in binary form must reproduce the above copyright | | 14 | * 2. Redistributions in binary form must reproduce the above copyright |
| @@ -176,27 +177,27 @@ struct fatp_mi { | | | @@ -176,27 +177,27 @@ struct fatp_mi { |
176 | }; | | 177 | }; |
177 | | | 178 | |
178 | static inline int | | 179 | static inline int |
179 | fatp_ntags(void) | | 180 | fatp_ntags(void) |
180 | { | | 181 | { |
181 | return FATP_NTAGS; | | 182 | return FATP_NTAGS; |
182 | } | | 183 | } |
183 | | | 184 | |
184 | static inline int | | 185 | static inline int |
185 | fatp_full(fatp_t *fp) | | 186 | fatp_full(fatp_t *fp) |
186 | { | | 187 | { |
187 | fatp_t full; | | 188 | fatp_t full; |
188 | | | 189 | |
189 | full.inuse = ~0; | | 190 | full.inuse = (1U << FATP_NTAGS) - 1U; |
190 | | | 191 | |
191 | return (fp->inuse == full.inuse); | | 192 | return (fp->inuse == full.inuse); |
192 | } | | 193 | } |
193 | | | 194 | |
194 | struct vtw_common; | | 195 | struct vtw_common; |
195 | struct vtw_v4; | | 196 | struct vtw_v4; |
196 | struct vtw_v6; | | 197 | struct vtw_v6; |
197 | struct vtw_ctl; | | 198 | struct vtw_ctl; |
198 | | | 199 | |
199 | /*!\brief common to all vtw | | 200 | /*!\brief common to all vtw |
200 | */ | | 201 | */ |
201 | typedef struct vtw_common { | | 202 | typedef struct vtw_common { |
202 | struct timeval expire; /* date of birth+msl */ | | 203 | struct timeval expire; /* date of birth+msl */ |