EDGESEC  0.1.0-alpha.0+sha.ca29a8277b72f80785649ea9ef9cd7edf642d939
Secure router - reference implementation
ipgen.h
Go to the documentation of this file.
1 
11 #ifndef IPGEN_H_
12 #define IPGEN_H_
13 
14 #include <stdbool.h>
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <errno.h>
18 #include <string.h>
19 
20 #include "os.h"
21 
22 struct ipgenctx {
24 };
25 
33 struct ipgenctx *ipgen_init_context(char *path);
34 
40 void ipgen_free_context(struct ipgenctx *context);
41 
53 int ipgen_create_interface(const struct ipgenctx *context, const char *ifname,
54  const char *type, const char *ip_addr,
55  const char *brd_addr, const char *subnet_mask);
56 
67 int ipgen_set_interface_ip(const struct ipgenctx *context, const char *ifname,
68  const char *ip_addr, const char *brd_addr,
69  const char *subnet_mask);
70 
78 int ipgen_reset_interface(const struct ipgenctx *context, const char *ifname);
79 #endif
int ipgen_reset_interface(const struct ipgenctx *context, const char *ifname)
Resets the interface.
Definition: ipgen.c:129
struct ipgenctx * ipgen_init_context(char *path)
Initialises the ipgen context.
Definition: ipgen.c:24
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.
Definition: ipgen.c:63
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.
Definition: ipgen.c:82
void ipgen_free_context(struct ipgenctx *context)
Frees the ipgen context.
Definition: ipgen.c:47
File containing the definition of the os functionalities.
#define MAX_OS_PATH_LEN
Definition: os.h:29
Definition: ipgen.h:22
char ipcmd_path[MAX_OS_PATH_LEN]
Definition: ipgen.h:23