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

_CONFNET Struct Reference
[Network ConfigurationNetwork Configuration]

#include <sys/confnet.h>


Detailed Description

Network configuration structure.

Applications may directly access the global variable confnet to read or modify the current network configuration.


Data Fields

u_char cd_size
 Size of this structure.
char cd_name [9]
 Magic cookie.
u_char cdn_mac [6]
 Ethernet MAC address.
u_long cdn_ip_addr
 Last used IP address.
u_long cdn_ip_mask
 IP netmask.
u_long cdn_gateway
 Default route.
u_long cdn_cip_addr
 Configured IP address.


Field Documentation

u_char _CONFNET::cd_size
 

Size of this structure.

Used by Nut/Net to verify, that the structure contents is valid after reading it from non-volatile memory.

char _CONFNET::cd_name[9]
 

Magic cookie.

Contains the device name of the network interface.

u_char _CONFNET::cdn_mac[6]
 

Ethernet MAC address.

Unique Ethernet address of the network interface.

Examples:
tcps/tcps.c.

u_long _CONFNET::cdn_ip_addr
 

Last used IP address.

Each time Nut/Net receives an IP address during boot, it will store the address in here.

If no fixed IP address has been configured (cdn_cip_addr contains 0.0.0.0) and if no DHCP server is available, then Nut/Net will use this one, if it is not 0.0.0.0.

Examples:
ftpd/ftpserv.c, httpd/httpserv.c, inetq/inetq.c, logtime/logtime.c, and tcps/tcps.c.

u_long _CONFNET::cdn_ip_mask
 

IP netmask.

The netmask is used to determine which machines are available in the local network.

Examples:
ftpd/ftpserv.c, and httpd/httpserv.c.

u_long _CONFNET::cdn_gateway
 

Default route.

Nut/Net will redirect IP packets to this node, if the target IP is not located in the local network.

Examples:
logtime/logtime.c.

u_long _CONFNET::cdn_cip_addr
 

Configured IP address.

If this address is set to 0.0.0.0, Nut/Net will try to obtain one from the DHCP server.


© 2000-2006 by egnite Software GmbH - visit http://www.ethernut.de/