Jump to main content

##

# TCPIP_IPV4_PacketGetSourceAddress Function

## C

    TCPIP_IPV4_PacketGetSourceAddress(
        TCPIP_MAC_PACKET* pPkt
    );

## Description

The function will return a pointer to where the IPv4 source address is located in the TCPIP_MAC_PACKET. The TCPIP_MAC_PACKET is supposed to be a valid IPv4 packet that has properly source address set.

## Preconditions

pPkt - valid IPv4 packet. pNetLayer filed properly set.

## Parameters

Parameters | Description
--- | ---
pPkt | Packet to query.

## Returns

- A valid pointer to an IPV$_ADDR - If it succeeds.
- 0 - If call failed.

## Remarks

This function is primarily meant for RX packets.