summaryrefslogtreecommitdiff
path: root/eth-multiplexer
AgeCommit message (Collapse)Author
2016-11-05eth-multiplexer: Generate stable ethernet addresses.Justus Winter
Previously, the ethernet multiplexer generated ethernet addresses for the virtual interfaces using a pseudo-random number generator. This has the downside of generating a new address every time. Generate stable pseudo-random addresses instead. * eth-multiplexer/Makefile (HURDLIBS): Link to libihash. * eth-multiplexer/ethernet.c (ether_address): New variable. (get_ethernet_address): New function. (ethernet_open): Get the ethernet address of the real interface. * eth-multiplexer/ethernet.h (ether_address): New declaration. * eth-multiplexer/vdev.c (add_vdev): Compute the ethernet address by hashing the address of the real interface with the name of the virtual interface.
2016-11-05eth-multiplexer: Avoid local definitions.Justus Winter
* eth-multiplexer/util.h: Include 'net/if_ether.h'. (ETH_ALEN): Drop. (struct ethhdr): Likewise. * eth-multiplexer/vdev.c: Include 'net/if_ether.h'. (ETH_HLEN): Drop.
2016-11-05eth-multiplexer: Fix retrieving status of virtual interfaces.Justus Winter
Previously, the ethernet multiplexer returned the status of the real network device if one was configured. This had the unfortunate consequence that all virtual devices shared the same ethernet address. * eth-multiplexer/device_impl.c (ds_device_get_status): Always return the information for the virtual device. * eth-multiplexer/vdev.h (dev_getstat): Add prototype.
2016-11-05eth-multiplexer: Fix packet delivery.Justus Winter
* eth-multiplexer/vdev.c (deliver_msg): Do not return an error if delivering a message fails. Doing so prevents all other filters from being executed, and more importantly aborts the iteration over all virtual devices.
2016-11-04eth-multiplexer: Merge the eth-multiplexer.Zheng Da
* Makefile (prog-subdirs): Add the new program. * NEWS: Update. * eth-multiplexer/ChangeLog: New file. * eth-multiplexer/Makefile: Likewise. * eth-multiplexer/README: Likewise. * eth-multiplexer/demuxer.c: Likewise. * eth-multiplexer/dev_stat.c: Likewise. * eth-multiplexer/device_impl.c: Likewise. * eth-multiplexer/ethernet.c: Likewise. * eth-multiplexer/ethernet.h: Likewise. * eth-multiplexer/mig-decls.h: Likewise. * eth-multiplexer/mig-mutate.h: Likewise. * eth-multiplexer/multiplexer.c: Likewise. * eth-multiplexer/netfs_impl.c: Likewise. * eth-multiplexer/netfs_impl.h: Likewise. * eth-multiplexer/notify_impl.c: Likewise. * eth-multiplexer/test.c: Likewise. * eth-multiplexer/util.h: Likewise. * eth-multiplexer/vdev.c: Likewise. * eth-multiplexer/vdev.h: Likewise. The eth-multiplexer has been written by Zheng Da. This merges his work into the main repository.