Changeset 15453 in vbox for trunk/src/VBox/Devices/Network/slirp/slirp_state.h
- Timestamp:
- Dec 13, 2008 10:35:53 PM (16 years ago)
- svn:sync-xref-src-repo-rev:
- 40904
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Devices/Network/slirp/slirp_state.h
r15195 r15453 74 74 /* Stuff from ip_input.c */ 75 75 struct ipstat_t ipstat; 76 #ifndef VBOX_WITH_BSD_REASS77 struct ipq_t ipq;78 #else /* !VBOX_WITH_BSD_REASS */79 76 struct ipqhead ipq[IPREASS_NHASH]; 80 77 int maxnipq; /* Administrative limit on # of reass queues*/ 81 78 int maxfragsperpacket; /* Maximum number of IPv4 fragments allowed per packet */ 82 79 int nipq; /* total number of reass queues */ 83 #endif /* VBOX_WITH_BSD_REASS */84 80 uint16_t ip_currid; 85 81 /* Stuff from mbuf.c */ … … 110 106 struct socket *tcp_last_so; 111 107 tcp_seq tcp_iss; 112 #if ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS)113 /* Stuff from tcp_subr.c */114 void *apvHash[16384];115 uint32_t cpvHashUsed;116 uint32_t cpvHashCollisions;117 uint64_t cpvHashInserts;118 uint64_t cpvHashDone;119 #endif /* ARCH_BITS == 64 && !defined(VBOX_WITH_BSD_REASS) */120 108 /* Stuff from tcp_timer.c */ 121 109 struct tcpstat_t tcpstat; 122 110 uint32_t tcp_now; 123 #ifdef VBOX_WITH_BSD_REASS124 111 int tcp_reass_qsize; 125 112 int tcp_reass_maxqlen; 126 113 int tcp_reass_maxseg; 127 114 int tcp_reass_overflows; 128 #endif /* VBOX_WITH_BSD_REASS */129 115 /* Stuff from tftp.c */ 130 116 struct tftp_session tftp_sessions[TFTP_SESSIONS_MAX]; … … 256 242 #define udp_last_so pData->udp_last_so 257 243 258 #ifdef VBOX_WITH_BSD_REASS259 260 244 #define maxfragsperpacket pData->maxfragsperpacket 261 245 #define maxnipq pData->maxnipq … … 267 251 #define tcp_reass_overflows pData->tcp_reass_overflows 268 252 269 #else /* ! VBOX_WITH_BSD_REASS */270 271 #if SIZEOF_CHAR_P != 4272 extern void VBoxU32PtrDone(PNATState pData, void *pv, uint32_t iHint);273 extern uint32_t VBoxU32PtrHashSlow(PNATState pData, void *pv);274 275 /** Hash the pointer, inserting it if need be. */276 DECLINLINE(uint32_t) VBoxU32PtrHash(PNATState pData, void *pv)277 {278 uint32_t i = ((uintptr_t)pv >> 3) % RT_ELEMENTS(pData->apvHash);279 if (RT_LIKELY(pData->apvHash[i] == pv && pv))280 return i;281 return VBoxU32PtrHashSlow(pData, pv);282 }283 /** Lookup the hash value. */284 DECLINLINE(void *) VBoxU32PtrLookup(PNATState pData, uint32_t i)285 {286 void *pv;287 Assert(i < RT_ELEMENTS(pData->apvHash));288 pv = pData->apvHash[i];289 Assert(pv || !i);290 return pv;291 }292 #endif293 294 #endif295 296 253 #endif /* !_slirp_state_h_ */
Note:
See TracChangeset
for help on using the changeset viewer.