- Timestamp:
- Jun 9, 2010 12:53:55 PM (15 years ago)
- Location:
- trunk/src/VBox/HostDrivers/VBoxNetFlt
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostDrivers/VBoxNetFlt/VBoxNetFltInternal.h
r30107 r30117 192 192 # else 193 193 /** Pointer to the bound IPv4 stream. */ 194 void volatile *pvIp4Stream;194 struct vboxnetflt_stream_t * volatile pvIp4Stream; 195 195 /** Pointer to the bound IPv6 stream. */ 196 void volatile *pvIp6Stream;196 struct vboxnetflt_stream_t * volatile pIp6Stream; 197 197 /** Pointer to the bound ARP stream. */ 198 void volatile *pvArpStream;198 struct vboxnetflt_stream_t * volatile pArpStream; 199 199 /** Pointer to the unbound promiscuous stream. */ 200 void volatile *pvPromiscStream;200 struct vboxnetflt_promisc_stream_t * volatile pPromiscStream; 201 201 /** Whether we are attaching to IPv6 stream dynamically now. */ 202 202 bool volatile fAttaching; -
trunk/src/VBox/HostDrivers/VBoxNetFlt/solaris/VBoxNetFlt-solaris.c
r30115 r30117 781 781 switch (pStream->Type) 782 782 { 783 case kIp4Stream: ASMAtomicUoWritePtr(&pThis->u.s.p vIp4Stream, pStream); break;784 case kIp6Stream: ASMAtomicUoWritePtr(&pThis->u.s.p vIp6Stream, pStream); break;785 case kArpStream: ASMAtomicUoWritePtr(&pThis->u.s.p vArpStream, pStream); break;786 case kPromiscStream: ASMAtomicUoWritePtr(&pThis->u.s.p vPromiscStream, pStream); break;783 case kIp4Stream: ASMAtomicUoWritePtr(&pThis->u.s.pIp4Stream, pStream); break; 784 case kIp6Stream: ASMAtomicUoWritePtr(&pThis->u.s.pIp6Stream, pStream); break; 785 case kArpStream: ASMAtomicUoWritePtr(&pThis->u.s.pArpStream, pStream); break; 786 case kPromiscStream: ASMAtomicUoWritePtr(&pThis->u.s.pPromiscStream, pStream); break; 787 787 default: /* Heh. */ 788 788 { … … 944 944 switch (pStream->Type) 945 945 { 946 case kIp4Stream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.p vIp4Stream); break;947 case kIp6Stream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.p vIp6Stream); break;948 case kArpStream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.p vArpStream); break;949 case kPromiscStream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.p vPromiscStream); break;946 case kIp4Stream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.pIp4Stream); break; 947 case kIp6Stream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.pIp6Stream); break; 948 case kArpStream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.pArpStream); break; 949 case kPromiscStream: ASMAtomicUoWriteNullPtr(&pStream->pThis->u.s.pPromiscStream); break; 950 950 default: /* Heh. */ 951 951 { … … 2476 2476 && RT_LIKELY(pTimer)) 2477 2477 { 2478 vboxnetflt_stream_t *pIp6Stream = ASMAtomicUoReadPtrT(pThis->u.s.pvIp6Stream, vboxnetflt_stream_t *);2478 vboxnetflt_stream_t *pIp6Stream = ASMAtomicUoReadPtrT(&pThis->u.s.pIp6Stream, vboxnetflt_stream_t *); 2479 2479 bool fIp6Attaching = ASMAtomicUoReadBool(&pThis->u.s.fAttaching); 2480 2480 if ( !pIp6Stream … … 2512 2512 2513 2513 int rc = VERR_GENERAL_FAILURE; 2514 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtrT(&pThis->u.s.p vPromiscStream, vboxnetflt_promisc_stream_t *);2514 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtrT(&pThis->u.s.pPromiscStream, vboxnetflt_promisc_stream_t *); 2515 2515 if (RT_LIKELY(pPromiscStream)) 2516 2516 { … … 2566 2566 vboxNetFltSolarisCloseStream(pThis); 2567 2567 int rc = VINF_SUCCESS; 2568 if (pThis->u.s.p vIp4Stream)2568 if (pThis->u.s.pIp4Stream) 2569 2569 rc = vboxNetFltSolarisAttachIp4(pThis, false /* fAttach */); 2570 if (pThis->u.s.p vIp6Stream)2570 if (pThis->u.s.pIp6Stream) 2571 2571 rc = vboxNetFltSolarisAttachIp6(pThis, false /* fAttach */); 2572 2572 2573 2573 #ifdef VBOXNETFLT_SOLARIS_IPV6_POLLING 2574 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtrT(&pThis->u.s.p vPromiscStream, vboxnetflt_promisc_stream_t *);2574 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtrT(&pThis->u.s.pPromiscStream, vboxnetflt_promisc_stream_t *); 2575 2575 if ( pPromiscStream 2576 2576 && pPromiscStream->pIp6Timer == NULL) … … 3198 3198 Assert(pStream->Type == kPromiscStream); 3199 3199 3200 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtrT(&pThis->u.s.p vPromiscStream, vboxnetflt_promisc_stream_t *);3200 vboxnetflt_promisc_stream_t *pPromiscStream = ASMAtomicUoReadPtrT(&pThis->u.s.pPromiscStream, vboxnetflt_promisc_stream_t *); 3201 3201 if (RT_UNLIKELY(!pPromiscStream)) 3202 3202 { … … 3579 3579 * Enable/disable promiscuous mode. 3580 3580 */ 3581 vboxnetflt_ stream_t *pStream = ASMAtomicUoReadPtrT(&pThis->u.s.pvPromiscStream, vboxnetflt_stream_t *);3581 vboxnetflt_promisc_stream_t *pStream = ASMAtomicUoReadPtrT(&pThis->u.s.pPromiscStream, vboxnetflt_stream_t *); 3582 3582 if (pStream) 3583 3583 { 3584 if (pStream-> pReadQueue)3585 { 3586 int rc = vboxNetFltSolarisPromiscReq(pStream-> pReadQueue, fActive);3584 if (pStream->Stream.pReadQueue) 3585 { 3586 int rc = vboxNetFltSolarisPromiscReq(pStream->Stream.pReadQueue, fActive); 3587 3587 if (RT_FAILURE(rc)) 3588 3588 LogRel((DEVICE_NAME ":vboxNetFltPortOsSetActive failed to request promiscuous mode! rc=%d\n", rc)); … … 3680 3680 */ 3681 3681 pThis->u.s.hIface = NULL; 3682 pThis->u.s.p vIp4Stream = NULL;3683 pThis->u.s.p vIp6Stream = NULL;3684 pThis->u.s.p vArpStream = NULL;3685 pThis->u.s.p vPromiscStream = NULL;3682 pThis->u.s.pIp4Stream = NULL; 3683 pThis->u.s.pIp6Stream = NULL; 3684 pThis->u.s.pArpStream = NULL; 3685 pThis->u.s.pPromiscStream = NULL; 3686 3686 pThis->u.s.fAttaching = false; 3687 3687 pThis->u.s.fVLAN = false; … … 3830 3830 * We either bind to both or neither; so atomic reading one should be sufficient. 3831 3831 */ 3832 vboxnetflt_stream_t *pIp4Stream = ASMAtomicUoReadPtrT(&pThis->u.s.p vIp4Stream, vboxnetflt_stream_t *);3832 vboxnetflt_stream_t *pIp4Stream = ASMAtomicUoReadPtrT(&pThis->u.s.pIp4Stream, vboxnetflt_stream_t *); 3833 3833 if (!pIp4Stream) 3834 3834 return rc; … … 3849 3849 LogFlow((DEVICE_NAME ":vboxNetFltPortOsXmit INTNETTRUNKDIR_HOST ARP\n")); 3850 3850 3851 vboxnetflt_stream_t *pArpStream = ASMAtomicUoReadPtrT(&pThis->u.s.p vArpStream, vboxnetflt_stream_t *);3851 vboxnetflt_stream_t *pArpStream = ASMAtomicUoReadPtrT(&pThis->u.s.pArpStream, vboxnetflt_stream_t *); 3852 3852 if (pArpStream) 3853 3853 { … … 3876 3876 else 3877 3877 { 3878 vboxnetflt_stream_t *pIp6Stream = ASMAtomicUoReadPtrT(&pThis->u.s.pvIp6Stream, vboxnetflt_stream_t *);3878 vboxnetflt_stream_t *pIp6Stream = ASMAtomicUoReadPtrT(&pThis->u.s.pIp6Stream, vboxnetflt_stream_t *); 3879 3879 if ( pEthHdr->EtherType == RT_H2BE_U16(RTNET_ETHERTYPE_IPV6) 3880 3880 && pIp6Stream)
Note:
See TracChangeset
for help on using the changeset viewer.