Contiki 2.6

uIP configuration functions

The uIP configuration functions are used for setting run-time parameters in uIP such as IP addresses. More...

Defines

#define uip_sethostaddr(addr)
 Set the IP address of this host.
#define uip_gethostaddr(addr)
 Get the IP address of this host.
#define uip_setdraddr(addr)
 Set the default router's IP address.
#define uip_setnetmask(addr)
 Set the netmask.
#define uip_getdraddr(addr)
 Get the default router's IP address.
#define uip_getnetmask(addr)
 Get the netmask.
#define uip_setethaddr(eaddr)
 Specifiy the Ethernet MAC address.

Detailed Description

The uIP configuration functions are used for setting run-time parameters in uIP such as IP addresses.


Define Documentation

#define uip_getdraddr (   addr)

Get the default router's IP address.

Parameters:
addrA pointer to a uip_ipaddr_t variable that will be filled in with the IP address of the default router.

Definition at line 214 of file uip.h.

Referenced by main().

#define uip_gethostaddr (   addr)

Get the IP address of this host.

The IP address is represented as a 4-byte array where the first octet of the IP address is put in the first member of the 4-byte array.

Example:

 uip_ipaddr_t hostaddr;

 uip_gethostaddr(&hostaddr);
Parameters:
addrA pointer to a uip_ipaddr_t variable that will be filled in with the currently configured IP address.

Definition at line 179 of file uip.h.

Referenced by main().

#define uip_getnetmask (   addr)

Get the netmask.

Parameters:
addrA pointer to a uip_ipaddr_t variable that will be filled in with the value of the netmask.

Definition at line 224 of file uip.h.

Referenced by main().

#define uip_setdraddr (   addr)

Set the default router's IP address.

Parameters:
addrA pointer to a uip_ipaddr_t variable containing the IP address of the default router.
See also:
uip_ipaddr()

Definition at line 191 of file uip.h.

Referenced by main().

#define uip_setethaddr (   eaddr)

Specifiy the Ethernet MAC address.

The ARP code needs to know the MAC address of the Ethernet card in order to be able to respond to ARP queries and to generate working Ethernet headers.

Note:
This macro only specifies the Ethernet MAC address to the ARP code. It cannot be used to change the MAC address of the Ethernet card.
Parameters:
eaddrA pointer to a struct uip_eth_addr containing the Ethernet MAC address of the Ethernet card.

Definition at line 134 of file uip_arp.h.

#define uip_sethostaddr (   addr)

Set the IP address of this host.

The IP address is represented as a 4-byte array where the first octet of the IP address is put in the first member of the 4-byte array.

Example:

 uip_ipaddr_t addr;

 uip_ipaddr(&addr, 192,168,1,2);
 uip_sethostaddr(&addr);
Parameters:
addrA pointer to an IP address of type uip_ipaddr_t;
See also:
uip_ipaddr()

Definition at line 159 of file uip.h.

Referenced by main().

#define uip_setnetmask (   addr)

Set the netmask.

Parameters:
addrA pointer to a uip_ipaddr_t variable containing the IP address of the netmask.
See also:
uip_ipaddr()

Definition at line 203 of file uip.h.

Referenced by main().