Exemplo n.º 1
0
SGL_LIST_NODE* TCPIP_Notification_Add(SINGLE_LIST* notifyList, TCPIP_HEAP_HANDLE heapH, size_t nBytes)
{
    SGL_LIST_NODE* newNode = TCPIP_HEAP_Malloc(heapH, nBytes);

    if(newNode)
    {
        TCPIP_Helper_SingleListTailAdd(notifyList, newNode);
    }
    return newNode;

}
Exemplo n.º 2
0
void ANNOUNCE_Notify(TCPIP_NET_HANDLE hNet, uint8_t evType, const void * param)
{
    if(announceMemH)
    {
        ANNOUNCE_LIST_NODE* newNode = TCPIP_HEAP_Malloc(announceMemH, sizeof(*newNode));

        if(newNode)
        {
            newNode->handle = hNet;
            newNode->event = evType;
            SingleListAddTail(&announceEvents, (SGL_LIST_NODE*)newNode);
            announceEventPending = true;
            return;
        }
    }

    return;
}
Exemplo n.º 3
0
ARP_HANDLE ARPRegisterHandler(TCPIP_NET_HANDLE hNet, ARP_EVENT_HANDLER handler, const void* hParam)
{
    if(arpMemH)
    {
        ARP_LIST_NODE* newNode = TCPIP_HEAP_Malloc(arpMemH, sizeof(*newNode));

        if(newNode)
        {
            newNode->handler = handler;
            newNode->hParam = hParam;
            newNode->hNet = hNet;
            SingleListAddTail(&arpRegisteredUsers, (SGL_LIST_NODE*)newNode);
            return newNode;
        }
    }

    return 0;

}