diff options
author | nsayer <nsayer@FreeBSD.org> | 2000-07-25 23:50:30 +0000 |
---|---|---|
committer | nsayer <nsayer@FreeBSD.org> | 2000-07-25 23:50:30 +0000 |
commit | 879de827c0ddd2d8b1bef53edfca86cf669e2e75 (patch) | |
tree | f49f1ee479ede6f9e84cc8ffd6e4dd2146234a74 /sys/net | |
parent | 4600fb1a7e25bffa13cd44b84ed7bfabdb751d15 (diff) | |
download | FreeBSD-src-879de827c0ddd2d8b1bef53edfca86cf669e2e75.zip FreeBSD-src-879de827c0ddd2d8b1bef53edfca86cf669e2e75.tar.gz |
Change to support vmware... SIOCSIFADDR on the character device
sets the (notional) "remote" ethernet address.
Submitted by: vsilyaev@mindspring.com
Diffstat (limited to 'sys/net')
-rw-r--r-- | sys/net/if_tap.c | 12 | ||||
-rw-r--r-- | sys/net/if_tapvar.h | 2 |
2 files changed, 8 insertions, 6 deletions
diff --git a/sys/net/if_tap.c b/sys/net/if_tap.c index 66af534..aad9101 100644 --- a/sys/net/if_tap.c +++ b/sys/net/if_tap.c @@ -284,6 +284,8 @@ tapopen(dev, flag, mode, p) if (tp->tap_flags & TAP_OPEN) return (EBUSY); + bcopy(tp->arpcom.ac_enaddr, tp->ether_addr, sizeof(tp->ether_addr)); + tp->tap_pid = p->p_pid; tp->tap_flags |= TAP_OPEN; taprefcnt ++; @@ -610,15 +612,13 @@ tapioctl(dev, cmd, data, flag, p) splx(s); } break; - case OSIOCGIFADDR: /* get MAC address */ + case OSIOCGIFADDR: /* get MAC address of the remote side */ case SIOCGIFADDR: - bcopy(tp->arpcom.ac_enaddr, data, ETHER_ADDR_LEN); + bcopy(tp->ether_addr, data, sizeof(tp->ether_addr)); break; - case SIOCSIFADDR: /* set MAC address */ - s = splimp(); - bcopy(data, tp->arpcom.ac_enaddr, ETHER_ADDR_LEN); - splx(s); + case SIOCSIFADDR: /* set MAC address of the remote side */ + bcopy(data, tp->ether_addr, sizeof(tp->ether_addr)); break; default: diff --git a/sys/net/if_tapvar.h b/sys/net/if_tapvar.h index a5e2032..f578294 100644 --- a/sys/net/if_tapvar.h +++ b/sys/net/if_tapvar.h @@ -54,6 +54,8 @@ struct tap_softc { #define TAP_READY (TAP_OPEN|TAP_INITED) #define TAP_VMNET (1 << 4) + u_int8_t ether_addr[ETHER_ADDR_LEN]; /* ether addr of the remote side */ + pid_t tap_pid; /* PID of process to open */ struct sigio *tap_sigio; /* information for async I/O */ struct selinfo tap_rsel; /* read select */ |