1.2.5.2.25 TCPIP_MAC_MODULE_CTRL Structure

C

typedef struct {
TCPIP_MAC_HEAP_MallocF mallocF;
TCPIP_MAC_HEAP_CallocF callocF;
TCPIP_MAC_HEAP_FreeF freeF;
TCPIP_MAC_HEAP_HANDLE memH;
TCPIP_MAC_PKT_AllocF pktAllocF;
TCPIP_MAC_PKT_FreeF pktFreeF;
TCPIP_MAC_PKT_AckF pktAckF;
TCPIP_MAC_SynchReqF synchF;
TCPIP_MAC_EventF eventF;
const void* eventParam;
uint16_t nIfs;
uint16_t moduleId;
uint16_t netIx;
uint16_t segLoadOffset;
uint8_t macAction;
uint8_t powerMode;
TCPIP_MAC_ADDR ifPhyAddress;
} TCPIP_MAC_MODULE_CTRL;

Description

MAC Initialization Data.

This is the data structure that the MAC user (TCP/IP stack) passes on to the MAC driver at the MAC initialization time. It contains all the data needed for the MAC to initialize itself and to start processing packets.

Members

MembersDescription
mallocFMalloc type allocation function.
callocFCalloc type allocation function.
freeFFree type allocation free function.
memHHandle to be used in the stack allocation service calls.
pktAllocFPacket allocation function.
pktFreeFPacket free function.
pktAckFPacket allocation function.
synchFSynchronization object request function.
eventFEvent notification function. used by the MAC for event reporting.
eventParamParameter to be used when the event function is called.
nIfsNumber of the interfaces supported in this session.
moduleIdModule identifier. Allows multiple channels/ports, etc. MAC support.
netIxIndex of the current interface.
segLoadOffsetThe extra space allocated at the beginning of the segment data buffer: TCPIP_MAC_DATA_SEGMENT.segLoad segLoadOffset == sizeof(TCPIP_MAC_SEGMENT_PAYLOAD::segmentPktPtr) + sizeof(TCPIP_MAC_SEGMENT_PAYLOAD::segmentDataGap). It can be different based on the MAC type included in the build MAC driver uses it to have the layout of the data segment.
macActionCurrent action for the MAC/stack: TCPIP_MAC_ACTION value.
powerModeThe power mode for this interface to go to. Valid only if stackAction == init/reinit. Ignored for deinitialize operation. TCPIP_MAC_POWER_MODE value.
ifPhyAddressPhysical address of the interface. MAC sets this field as part of the initialization function. The stack will use this data as the interface address.

Remarks

Most of the data that's passed in this structure is permanent data. It is maintained by the stack for one full session i.e., across Initialize() -> DeInitialize() calls.

Some fields are module specific though (like the memory allocation handle, allocation functions, etc.) that could be different from one module to the other.