Functions | |
uint32_t | net_set_gateway (char *ip, char *sub_mask) |
Configure a gateway. More... | |
char * | get_netlib_ver (char *buffer) |
Retrieve netlib revision string. More... | |
char * | net_allocate_aligned_buffer (int32_t size) |
Allocate a data buffer, aligned to the processors cache line size. More... | |
addr_type * | get_address_offset (uint16_t dev_nr) |
Get current offset of MAC + IP address structure. More... | |
uint32_t | get_ip_address (uint16_t dev_nr) |
Get configured IP address. More... | |
uint32_t | set_ip_address (uint16_t dev_nr, char *addr_str) |
Set IP address. More... | |
uint32_t | get_mac_address (uint16_t dev_nr, uint16_t *dest) |
Get MAC address. More... | |
void | net_print_stat (uint16_t dev_nr, tpOutputFunc pLog) |
Print statistic TCP stack information. More... | |
Variables | |
const char | netlib_ver [] |
uint32_t net_set_gateway | ( | char * | ip, |
char * | sub_mask | ||
) |
ip | - Gateway IP address |
sub_mask | - Subnet Mask |
This function is only required in manually administered networks, a DHCP server automatically provides this information. The subnet mask defines the address range of the local subnet, e.g. "255.255.255.0". This mask is bit-wise ANDed with the destination IP address any time a message is sent. If the result is not equal to zero, the destination is outside the local subnet, and the data will be transmitted via the specified gateway.
char * get_netlib_ver | ( | char * | buffer | ) |
buffer | - buffer to hold string |
Returns the netlib revision string. The buffer must be large enough to hold up to 6 characters including the terminating zero.
dev_nr | - adapter number ( always 0 for DSK) |
dev_nr | - adapter number ( always 0 for DSK) |
Obtain configured IP address. The returned address is in network-byteorder. For readable printout it must be converted with function inet_ntoa().
dev_nr | - adapter number ( always 0 for DSK) |
addr_str | - new IP address |
Change own IP address on demand. If address "0.0.0.0" is specified, the own IP address is cleared and re-assigned with the first valid received IP packet.
dev_nr | - adapter number ( always 0 for DSK) |
dest | - destination buffer to hold MAC address string |
Obtain own MAC address. Destination buffer must be large enough to hold up to 6 characters.
void net_print_stat | ( | uint16_t | dev_nr, |
tpOutputFunc | pLog | ||
) |
dev_nr | - device number |
pLog | - pointer to printf function |
netlib_ver[] |