|
EDGESEC
0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
|
File containing the definition of the ip generic interface utilities. More...
#include <stdbool.h>#include <stdio.h>#include <stdlib.h>#include <errno.h>#include <string.h>#include "os.h"Go to the source code of this file.
Data Structures | |
| struct | ipgenctx |
Functions | |
| struct ipgenctx * | ipgen_init_context (char *path) |
| Initialises the ipgen context. More... | |
| void | ipgen_free_context (struct ipgenctx *context) |
| Frees the ipgen context. More... | |
| int | ipgen_create_interface (const struct ipgenctx *context, const char *ifname, const char *type, const char *ip_addr, const char *brd_addr, const char *subnet_mask) |
| Creates and interface and assigns an IP. More... | |
| int | ipgen_set_interface_ip (const struct ipgenctx *context, const char *ifname, const char *ip_addr, const char *brd_addr, const char *subnet_mask) |
| Set the IP address for an interface. More... | |
| int | ipgen_reset_interface (const struct ipgenctx *context, const char *ifname) |
| Resets the interface. More... | |
File containing the definition of the ip generic interface utilities.
| int ipgen_create_interface | ( | const struct ipgenctx * | context, |
| const char * | ifname, | ||
| const char * | type, | ||
| const char * | ip_addr, | ||
| const char * | brd_addr, | ||
| const char * | subnet_mask | ||
| ) |
Creates and interface and assigns an IP.
| context | The ipgen context interface |
| ifname | The interface name |
| type | The interface type |
| ip_addr | The interface IP4 address |
| brd_addr | The interface IP4 broadcast address |
| subnet_mask | The interface IP4 subnet mask |
| void ipgen_free_context | ( | struct ipgenctx * | context | ) |
Frees the ipgen context.
| context | The ipgen context created by ipgen_init_context() |
| context | The ipgen context |
| struct ipgenctx* ipgen_init_context | ( | char * | path | ) |
Initialises the ipgen context.
| path | The path string to the ip command |
| int ipgen_reset_interface | ( | const struct ipgenctx * | context, |
| const char * | ifname | ||
| ) |
Resets the interface.
| context | The ipgen context interface |
| ifname | The interface name |
| int ipgen_set_interface_ip | ( | const struct ipgenctx * | context, |
| const char * | ifname, | ||
| const char * | ip_addr, | ||
| const char * | brd_addr, | ||
| const char * | subnet_mask | ||
| ) |
Set the IP address for an interface.
| context | The ipgen context interface |
| ifname | The interface name |
| ip_addr | The interface IP4 address |
| brd_addr | The interface IP4 broadcast address |
| subnet_mask | The interface IP4 subnet mask |