Main Page | Modules | Data Structures | Directories | File List | Data Fields | Globals | Related Pages

# IP (Internet Protocol) Library (ip.c)
[Network Library]

## Detailed Description

     #include "net/ip.h"

Description
  The IP (Internet Protocol) library provide support for sending IP and IP-related packets. It's not clear if additional features are needed or will be added, or even if this is the proper way to facilitate IP packet operations.

## Data Structures
struct | ipConfig
| < IP addressing/configuration structure More...
## Defines
#define | IP_TIME_TO_LIVE 128
| default Time-To-Live (TTL) value to use in IP headers
## Functions
void | ipSetConfig (uint32_t myIp, uint32_t netmask, uint32_t gatewayIp)
ipConfig * | ipGetConfig (void)
void | ipPrintConfig (struct ipConfig *config)
void | ipSend (uint32_t dstIp, uint8_t protocol, uint16_t len, uint8_t *data)
| Send an IP packet.
void | udpSend (uint32_t dstIp, uint16_t dstPort, uint16_t len, uint8_t *data)
| Send a UDP/IP packet.

## Function Documentation

struct ipConfig* ipGetConfig | ( | void |  | ) |

| Get our local IP configuration. Returns pointer to current IP address/configuration. Definition at line 42 of file ip.c.

void ipPrintConfig | ( | struct ipConfig * | config | ) |

| Print IP configuration Definition at line 129 of file ip.c.

void ipSetConfig | ( | uint32_t | myIp,
|  | uint32_t | netmask,
|  | uint32_t | gatewayIp
| ) |

| Set our IP address and routing information. The myIp value will be used in the source field of IP packets. Use this function to set and reset the system IP address. Definition at line 28 of file ip.c.