net: Network |
Top Previous Next |
The Network functions are used for establishing a connection either to the internet or to a local network.
The following network interfaces are supported:
When using the 'net' API the external WiFi and Ethernet add-on modules are not supported.
The following defines are present representing each interface: 1 _NET_IFACE_MOBILE // _NET_IFACE_CELLULAR 2 _NET_IFACE_LAN1 3 _NET_IFACE_LAN2 4 _NET_IFACE_WLAN 5 _NET_IFACE_WLAN_AP
Network Address Translation (NAT) This is a way to route socket connections between different network interfaces. It is possible to configure a network interface to be a gateway to the Internet. When this is done, NAT is used to masquerade outgoing socket connection, as if sending from the device. Please note that only one network interface can be set as gateway at a time. The NAT functionality is only available on devices with NX32L architecture.
Dynamic Host Configuration Protocol (DHCP) server This server uses the DHCP to dynamically assign an IP address and other network configuration parameters to each device on a network. The configuration parameters the DHCP server assigns are configured for each network interface. The DHCP server is only available on devices with NX32L architecture.
Port Forwarding This is a way to forward incoming connections from a network interface to a client device located on a different network interface. The forwarding rules always apply to the network interface which is configured as the NAT gateway. If the NAT gateway configuration is moved to a different network interface, the port forwarding rules will follow automatically. For example: If the WLAN network interface is configured as NAT Gateway, then only incoming connections from this interface will be forwarded. Later the Mobile network interface is configured as NAT Gateway,and only incoming connections from this interface will be forwarded, no changes to the port forwarding rules are necessary.
If no rules are defined, no incoming socket connections will be forwarded to other network interfaces.
The following functions are available:
The following functions are available for configuring the network interfaces:
The following functions are available for network services:
|