uIP conversion functions
[Uip]


Detailed Description

These functions can be used for converting between different data formats used by uIP.


Defines

#define uip_ipaddr(addr, addr0, addr1, addr2, addr3)
#define HTONS(n)

Functions

u16_t htons (u16_t val)


Define Documentation

#define HTONS  ) 
 

Convert 16-bit quantity from host byte order to network byte order.

This macro is primarily used for converting constants from host byte order to network byte order. For converting variables to network byte order, use the htons() function instead.

Definition at line 706 of file uip.h.

Referenced by example5_init(), main(), uip_arp_arpin(), and uip_init().

#define uip_ipaddr addr,
addr0,
addr1,
addr2,
addr3   ) 
 

Pack an IP address into a 4-byte array which is used by uIP to represent IP addresses.

Example:

 u16_t ipaddr[2];

 uip_ipaddr(&ipaddr, 192,168,1,2); 

Parameters:
addr A pointer to a 4-byte array that will be filled in with the IP addres.
addr0 The first octet of the IP address.
addr1 The second octet of the IP address.
addr2 The third octet of the IP address.
addr3 The forth octet of the IP address.

Definition at line 690 of file uip.h.


Function Documentation

u16_t htons u16_t  val  ) 
 

Convert 16-bit quantity from host byte order to network byte order.

This function is primarily used for converting variables from host byte order to network byte order. For converting constants to network byte order, use the HTONS() macro instead.

Definition at line 1576 of file uip.c.

Referenced by main(), uip_init(), and uip_tcpchksum().


Generated on Fri Jan 6 22:23:19 2006 for EtherProgs by  doxygen 1.4.5