Changeset 27973 in vbox for trunk/include
- Timestamp:
- Apr 4, 2010 12:33:03 AM (15 years ago)
- svn:sync-xref-src-repo-rev:
- 59679
- Location:
- trunk/include/VBox
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/include/VBox/pdmnetifs.h
r27841 r27973 86 86 /** Owner mask. */ 87 87 #define PDMSCATTERGATHER_FLAGS_OWNER_MASK UINT32_C(0x00000003) 88 /** Mask of flags available to general use. 89 * The parties using the SG must all agree upon how to use these of course. */ 90 #define PDMSCATTERGATHER_FLAGS_AVL_MASK UINT32_C(0x0000f000) 91 /** Flags reserved for future use, MBZ. */ 92 #define PDMSCATTERGATHER_FLAGS_RVD_MASK UINT32_C(0x00000ff8) 88 93 /** @} */ 89 94 … … 135 140 */ 136 141 DECLR3CALLBACKMEMBER(int, pfnReceive,(PPDMINETWORKDOWN pInterface, const void *pvBuf, size_t cb)); 137 138 142 139 143 /** … … 145 149 * 146 150 * @param pInterface Pointer to this interface. 147 * @param pSgBuf Scatter/gather buffer of the size previously148 * requested. Pass to PDMINETWORKUP::pfnSendBuf or149 * PDMINETWORKUP::pfnFreeBuf.150 *151 151 * @thread Non-EMT. 152 152 */ … … 195 195 * but there could of course be races. 196 196 * 197 * @param pInterface Pointer to the interface structure containing the called function pointer. 197 * @param pInterface Pointer to the interface structure containing the 198 * called function pointer. 198 199 * @param cbMin The minimum buffer size. 200 * @param pGso Pointer to a GSO context (only reference while in 201 * this call). NULL indicates no segmentation 202 * offloading. PDMSCATTERGATHER::pvUser is used to 203 * indicate that a network SG uses GSO, usually by 204 * pointing to a copy of @a pGso. 199 205 * @param ppSgBuf Where to return the buffer. The buffer will be 200 206 * owned by the caller, designation owner number 1. … … 202 208 * @thread Any, but normally EMT. 203 209 */ 204 DECLR3CALLBACKMEMBER(int, pfnAllocBuf,(PPDMINETWORKUP pInterface, size_t cbMin, PPPDMSCATTERGATHER ppSgBuf)); 210 DECLR3CALLBACKMEMBER(int, pfnAllocBuf,(PPDMINETWORKUP pInterface, size_t cbMin, PCPDMNETWORKGSO pGso, 211 PPPDMSCATTERGATHER ppSgBuf)); 205 212 206 213 /** … … 278 285 } PDMINETWORKUP; 279 286 /** PDMINETWORKUP interface ID. */ 280 #define PDMINETWORKUP_IID " f915243e-801a-4868-8979-b6b8594b09cc"287 #define PDMINETWORKUP_IID "0e603bc1-3016-41b4-b521-15c038cda16a" 281 288 282 289 -
trunk/include/VBox/types.h
r26137 r27973 738 738 739 739 /** 740 * Forms of generic segment offloading. 741 */ 742 typedef enum PDMNETWORKGSOTYPE 743 { 744 /** Invalid zero value. */ 745 PDMNETWORKGSOTYPE_INVALID = 0, 746 /** TCP/IPv4. */ 747 PDMNETWORKGSOTYPE_IPV4_TCP, 748 #if 0 /* later */ 749 /** TCP/IPv6. */ 750 PDMNETWORKGSOTYPE_IPV6_TCP, 751 /** UDP/IPv4. */ 752 PDMNETWORKGSOTYPE_IPV4_UDP, 753 /** UDP/IPv6. */ 754 PDMNETWORKGSOTYPE_IPV6_UDP, 755 /** IPv6 over IPv4 tunneling. */ 756 PDMNETWORKGSOTYPE_IPV4_TCPV6, 757 /** TCP/IPv6 over IPv4 tunneling. 758 * The header offsets and sizes relates to IPv4 and TCP, the IPv6 header is 759 * figured out as needed. 760 * @todo Needs checking against facts, this is just an outline of the idea. */ 761 PDMNETWORKGSOTYPE_IPV4_TCPV6_TCP, 762 /** UDP/IPv6 over IPv4 tunneling. 763 * The header offsets and sizes relates to IPv4 and UDP, the IPv6 header is 764 * figured out as needed. 765 * @todo Needs checking against facts, this is just an outline of the idea. */ 766 PDMNETWORKGSOTYPE_IPV4_TCPV6_UDP, 767 #endif 768 /** The end of valid GSO types. */ 769 PDMNETWORKGSOTYPE_END 770 } PDMNETWORKGSOTYPE; 771 772 773 /** 774 * Generic segment offloading context. 775 * 776 * We generally follow the E1000 specs wrt to which header fields we change. 777 * However the GSO type implies where the checksum fields are and that they are 778 * always updated from scratch (no half done pseudo checksums). 779 * 780 * @remarks This is part of the internal network GSO packets. Take great care 781 * when making changes. The size is expected to be exactly 8 bytes. 782 */ 783 typedef struct PDMNETWORKGSO 784 { 785 /** The type of segmentation offloading we're performing (PDMNETWORKGSOTYPE). */ 786 uint8_t u8Type; 787 /** The total header size. */ 788 uint8_t cbHdrs; 789 /** The max segment size (MSS) to apply. */ 790 uint16_t cbMaxSeg; 791 792 /** Offset of the first header (IPv4 / IPv6). */ 793 uint8_t offHdr1; 794 /** The size of the first header (IPv4 / IPv6). */ 795 uint8_t cbHdr1; 796 797 /** Offset of the second header (TCP / UDP). */ 798 uint8_t offHdr2; 799 /** The size of the second header (TCP / UDP). */ 800 uint8_t cbHdr2; 801 } PDMNETWORKGSO; 802 /** Pointer to a GSO context. */ 803 typedef PDMNETWORKGSO *PPDMNETWORKGSO; 804 /** Pointer to a const GSO context. */ 805 typedef PDMNETWORKGSO const *PCPDMNETWORKGSO; 806 807 808 /** 740 809 * The current ROM page protection. 741 810 *
Note:
See TracChangeset
for help on using the changeset viewer.