Go to the source code of this file.
Functions | |
void | Network_SetPending (int state) |
Sets whether the Network subsystem is currently trying to negotiate its settings. | |
void * | Socket (int address, int port) |
Create a new TCP socket connected to the address and port specified. | |
int | SocketBytesAvailable (void *socket) |
Get the number of bytes available in a TCP socket. | |
int | SocketRead (void *socket, char *data, int length) |
Read from a TCP socket. | |
int | SocketReadLine (void *socket, char *data, int length) |
Read a line from a TCP socket terminated by CR LF (0x0D 0x0A). | |
int | SocketWrite (void *socket, char *data, int length) |
Write to a TCP socket. | |
void | SocketClose (void *socket) |
Close an existing TCP socket. | |
void * | ServerSocket (int port) |
Create a new TCP server socket and start listening for connections. | |
void * | ServerSocketAccept (void *serverSocket) |
Accept an incoming connection to a ServerSocket that you have created. | |
int | ServerSocketClose (void *serverSocket) |
Close a ServerSocket that you have created. | |
void * | DatagramSocket (int port) |
Create a socket to read and write UDP packets. | |
int | DatagramSocketSend (void *datagramSocket, int address, int port, void *data, int length) |
Send a UDP packet to a specified address. | |
int | DatagramSocketReceive (void *datagramSocket, int incomingPort, int *address, int *port, void *data, int length) |
Receive a UDP packet. | |
void | DatagramSocketClose (void *socket) |
Close a DatagramSocket(). | |
int | Network_SetActive (int state) |
Sets whether the Network subsystem is active. | |
int | Network_GetActive (void) |
Returns the active state of the Network subsystem. | |
int | Network_SetAddress (int a0, int a1, int a2, int a3) |
Set the IP address of the Make Controller. | |
int | Network_SetMask (int a0, int a1, int a2, int a3) |
Set the network mask of the Make Controller on your local network. | |
int | Network_SetGateway (int a0, int a1, int a2, int a3) |
Set the gateway address for the local network the Make Controller is on. | |
int | Network_GetAddress (int *a0, int *a1, int *a2, int *a3) |
Read the board's current IP address. | |
int | Network_GetMask (int *a0, int *a1, int *a2, int *a3) |
Read the board's current network mask. | |
int | Network_GetGateway (int *a0, int *a1, int *a2, int *a3) |
Read the board's current gateway address. | |
void | Network_SetDhcpEnabled (int enabled) |
Set whether DHCP is enabled. | |
int | Network_GetDhcpEnabled () |
Read whether DHCP is currently enabled. | |
int | Network_DnsGetHostByName (const char *name) |
Resolve the IP address for a given host name. | |
int | Network_SetValid (int v) |
Create a checksum for the current address settings and store it in EEPROM. | |
int | Network_GetValid () |
Read the checksum for address settings in EEPROM, and determine if it matches the current settings. |
Definition in file network.c.
int Network_GetValid | ( | void | ) |
void Network_SetPending | ( | int | state | ) |
Sets whether the Network subsystem is currently trying to negotiate its settings.
This is mostly used by the Network init and deinit processes, so you shouldn't be calling this yourself unless you have a good reason to.
state | An integer specifying the pending state - 1 (pending) or 0 (not pending). |
int Network_SetValid | ( | int | v | ) |
Create a checksum for the current address settings and store it in EEPROM.
This should be called each time an address setting is changed so that if the board gets powered down, it will know when it comes back up whether or not the address settings is currently has are valid.
v | An integer specifying whether to validate the current settings (1) or to force them to be invalidated (0). Passing in 0 returns the address settings to their factory defaults. |