VirtualBox

Changeset 99962 in vbox for trunk/include/VBox/vmm


Ignore:
Timestamp:
May 24, 2023 11:27:39 PM (18 months ago)
Author:
vboxsync
Message:

VBox/types.h,pdmnetifs.h: Replaced PDMDATASEG with RTSGSEG since the two structures are identical. This should make it easy to create a RTSGBUF for a PDMSCATTERGATHER buffer (just limit the operations to cbUsed bytes).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/include/VBox/vmm/pdmnetifs.h

    r98103 r99962  
    4141
    4242#include <VBox/types.h>
     43#include <iprt/sg.h>
    4344
    4445
     
    5354/**
    5455 * PDM scatter/gather buffer.
    55  *
     56 * 
     57 * @note    This is a little bit similar to the RTSGBUF structure in IPRT.
     58 * 
     59 *          It is possible to reuse the PDMSCATTERGATHER::aSegs member here in a
     60 *          RTSGBUF, but must always remember to specify
     61 *          PDMSCATTERGATHER::cbUsed as the max length to any RTSgBufXxxx API
     62 *          call, since the segments here will (normally) describe the full
     63 *          PDMSCATTERGATHER::cbAvailable length.
     64 * 
    5665 * @todo Promote this to VBox/types.h, VBox/vmm/pdmcommon.h or some such place.
    5766 */
     
    7382     * This is set on alloc and not changed by the user. */
    7483    size_t          cSegs;
    75     /** Variable sized array of segments. */
    76     PDMDATASEG      aSegs[1];
     84    /** Variable sized array of segments.
     85     * This describes the max allocated buffer length, consumers must limit
     86     * operations to PDMSCATTERGATHER::cbUser. */
     87    RTSGSEG         aSegs[1];
    7788} PDMSCATTERGATHER;
    7889/** Pointer to a PDM scatter/gather buffer. */
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette