Commit c2ee19da authored by Juliusz Chroboczek's avatar Juliusz Chroboczek

Implement myipv4.

parent de27eabf
......@@ -52,6 +52,7 @@ THE SOFTWARE.
struct timeval now;
unsigned char myid[16];
unsigned char *myipv4 = NULL;
int debug = 0;
static int maxmtu;
......@@ -191,6 +192,13 @@ main(int argc, char **argv)
} else if(strcmp(*arg, "-d") == 0) {
SHIFTE();
debug = atoi(*arg);
} else if(strcmp(*arg, "-4") == 0) {
SHIFTE();
myipv4 = malloc(16);
if(myipv4 == NULL) goto syntax;
rc = parse_address(*arg, myipv4);
if(rc < 0) goto syntax;
if(!v4mapped(myipv4)) goto syntax;
} else {
goto syntax;
}
......
......@@ -87,6 +87,7 @@ extern int debug;
extern int reboot_time;
extern unsigned char myid[16];
extern unsigned char *myipv4;
extern struct network nets[MAXNETS];
extern int numnets;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment