aboutsummaryrefslogtreecommitdiff
path: root/eth-multiplexer/vdev.c
Commit message (Collapse)AuthorAgeFilesLines
* Fix const warningsSamuel Thibault2022-01-171-1/+1
| | | | | Now that the RPCs have const, this forces us cleaning our const-meant functions.
* eth-multiplexer: Fix interface name truncationSamuel Thibault2020-11-221-1/+2
| | | | * eth-multiplexer/vdev.c (add_vdev): Fix terminating vdev->name string.
* eth-multiplexer: Avoid copying data multiple times.Justus Winter2017-09-251-20/+15
| | | | | | | * eth-multiplexer/vdev.c (broadcast_pack): Construct message just once. (deliver_pack): Remove function. (deliver_msg): Make function static. * eth-multiplexer/vdev.h (deliver_{msg,pack}): Remove declarations.
* eth-multiplexer: Simplify device creation.Justus Winter2017-09-251-3/+2
| | | | | | * eth-multiplexer/vdev.c (add_vdev): Remove class and bucket parameter. * eth-multiplexer/vdev.h (add_vdev): Likewise. * eth-multiplexer/device_impl.c (ds_device_open): Update callsite.
* eth-multiplexer: Remove unused function.Justus Winter2017-09-251-7/+0
| | | | | * eth-multiplexer/vdev.c (has_vdev): Drop function. * eth-multiplexer/vdev.h (has_vdev): Drop declaration.
* eth-multiplexer: Respect interfaces up flags.Justus Winter2017-08-231-1/+13
| | | | | | | | | * eth-multiplexer/device_impl.c (ds_device_write): Deny writes when interface is down. * eth-multiplexer/vdev.c (add_vdev): Initialize flags to a sane value. (broadcast_pack): Skip interfaces that are down. (broadcast_msg): Likewise.
* eth-multiplexer: Generate stable ethernet addresses.Justus Winter2016-11-051-1/+8
| | | | | | | | | | | | | | | | 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.
* eth-multiplexer: Avoid local definitions.Justus Winter2016-11-051-1/+1
| | | | | | | | * 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.
* eth-multiplexer: Fix packet delivery.Justus Winter2016-11-051-1/+0
| | | | | | | * 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.
* eth-multiplexer: Merge the eth-multiplexer.Zheng Da2016-11-041-0/+309
* 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.