Imported Upstream version 1.3.1~svn3789
This commit is contained in:
parent
ce56f3183d
commit
d869f11566
24 changed files with 420 additions and 456 deletions
11
tuntap_osx.c
11
tuntap_osx.c
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
* (C) 2007-08 - Luca Deri <deri@ntop.org>
|
||||
* (C) 2007-09 - Luca Deri <deri@ntop.org>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
@ -28,7 +28,8 @@ int tuntap_open(tuntap_dev *device /* ignored */,
|
|||
char *dev,
|
||||
char *device_ip,
|
||||
char *device_mask,
|
||||
const char * device_mac ) {
|
||||
const char * device_mac,
|
||||
int mtu) {
|
||||
int i;
|
||||
char tap_device[N2N_OSX_TAPDEVICE_SIZE];
|
||||
|
||||
|
@ -61,8 +62,8 @@ int tuntap_open(tuntap_dev *device /* ignored */,
|
|||
system(buf);
|
||||
}
|
||||
|
||||
snprintf(buf, sizeof(buf), "ifconfig tap%d %s netmask %s mtu 1400 up",
|
||||
i, device_ip, device_mask);
|
||||
snprintf(buf, sizeof(buf), "ifconfig tap%d %s netmask %s mtu %d up",
|
||||
i, device_ip, device_mask, mtu);
|
||||
system(buf);
|
||||
|
||||
traceEvent(TRACE_NORMAL, "Interface tap%d up and running (%s/%s)",
|
||||
|
@ -89,7 +90,7 @@ int tuntap_open(tuntap_dev *device /* ignored */,
|
|||
exit(0);
|
||||
}
|
||||
|
||||
traceEvent(TRACE_NORMAL, "Interface tap%d mac %s", i, buf);
|
||||
traceEvent(TRACE_NORMAL, "Interface tap%d [MTU %d] mac %s", i, mtu, buf);
|
||||
if(sscanf(buf, "%02x:%02x:%02x:%02x:%02x:%02x", &a, &b, &c, &d, &e, &f) == 6) {
|
||||
device->mac_addr[0] = a, device->mac_addr[1] = b;
|
||||
device->mac_addr[2] = c, device->mac_addr[3] = d;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue