summaryrefslogtreecommitdiff
path: root/eth-multiplexer
AgeCommit message (Collapse)Author
2022-01-17Fix const warningsSamuel Thibault
Now that the RPCs have const, this forces us cleaning our const-meant functions.
2022-01-16Make RPC input array parameters constSamuel Thibault
This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
2022-01-01Fix build warningsSamuel Thibault
No actual behavior change.
2020-11-22eth-multiplexer: Fix interface name truncationSamuel Thibault
* eth-multiplexer/vdev.c (add_vdev): Fix terminating vdev->name string.
2020-07-18Add new RPC server stubs for device_intr_*v0.9.git20200718Samuel Thibault
* boot/boot.c (ds_device_intr_register, ds_device_intr_ack): New stubs. * devnode/devnode.c (ds_device_intr_register, ds_device_intr_ack): New stubs. * eth-multiplexer/device_impl.c (ds_device_intr_register, ds_device_intr_ack): New stubs.
2020-03-31Fix build with -fno-commonSamuel Thibault
which will be the default in gcc-10. * acpi/acpifs.h (fs, acpifs_maptime): Add extern qualifier. * boot/private.h (verbose): Likewise. * eth-multiplexer/netfs_impl.h (multiplexer_maptime): Likewise. * eth-multiplexer/vdev.h (port_bucket, vdev_portclass): Likewise. * exec/priv.h (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.h (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, zeroblock, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, node_to_page_lock, generation_lock, next_generation, group_desc_image, global_pokel, modified_global_blocks, use_xattr_translator_records): Likewise. * hostmux/hostmux.h (hostmux_maptime): Likewise. * isofs/isofs.h (host_name, mounted_on, disk_image, disk_image_len, logical_block_size, sblock): Likewise. * libdiskfs/diskfs.h (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Likewise. * libnetfs/callbacks.h (_netfs_translator_callback1, _netfs_translator_callback2): Likewise. * libnetfs/priv.h (netfs_mtime): Likewise. * libpager/priv.h (_pager_class): Likewise. * libtrivfs/trivfs.h (trivfs_check_access_hook, trivfs_check_open_hook, trivfs_open_hook, trivfs_protid_create_hook, trivfs_peropen_create_hook, trivfs_protid_destroy_hook, trivfs_peropen_destroy_hook, trivfs_getroot_hook): Likewise. * lwip/lwip-hurd.h (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_protid_portclasses, lwip_cntl_portclasses, lwip_bootstrap_portclass, fsys_identity, lwipcntl, lwip_owner, lwip_group): Likewise. * lwip/port/include/netif/hurdtunif.h (tunnel_cntlclass, tunnel_class): Likewise. * nfs/nfs.h (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/nfsd.h (mapped_time, authserver): Likewise. * pci-arbiter/pcifs.h (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.h (pci_shutdown_notify_class, arrange_shutdown_notification): Likewise. * pfinet/pfinet.h (pfinet_bucket, addrport_class, socketport_class, fsys_identity, pfinetctl, pfinet_owner, pfinet_group): Likewise. * pflocal/sserver.h (sock_port_bucket): Likewise. * proc/proc.h (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/term.h (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, inputq, rawq, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.h (usermux_maptime): Likewise. * utils/msgids.h (msgid_argp): Likewise. * libdiskfs/priv.h (_diskfs_mtime): Remove definition. * lwip/options.h (lwip_argp): Add prototype. * mach-defpager/priv.h (partitions): Name structure. (all_partitions): Add extern qualifier. * acpi/main.c (acpifs_maptime, fs): New variables. * exec/main.c (port_bucket, execboot_portclass): Likewise. * ext2fs/ext2fs.c (sblock, sblock_dirty, block_size, log2_block_size, log2_dev_blocks_per_fs_block, log2_stat_blocks_per_fs_block, frag_size, frags_per_block, inodes_per_block, itb_per_group, db_per_group, desc_per_block, addr_per_block, groups_count, next_generation, group_desc_image, global_pokel, use_xattr_translator_records): Likewise. * isofs/main.c (host_name, mounted_on, logical_block_size, sblock): Likewise. * libpager/pager-create.c (_pager_class): Likewise. * lwip/port/netif/hurdtunif.c (tunnel_cntlclass, tunnel_class): Likewise. * mach-defpager/default_pager.c (all_partitions): Likewise. * nfs/main.c (main_udp_socket, hostname, mapped_time): Likewise. * nfsd/main.c (mapped_time, authserver): Likewise. * pci-arbiter/main.c (fs, pcifs_maptime): Likewise. * pci-arbiter/startup.c (*pci_shutdown_notify_class): Likewise. * pfinet/main.c (pfinetctl, pfinet_owner, pfinet_group, pfinet_bucket, addrport_class, socketport_class, fsys_identity): Likewise. * proc/main.c (authserver, self_proc, init_proc, startup_proc, proc_bucket, proc_class, generic_port_class, exc_class, generic_port, kernel_proc, global_lock): Likewise. * term/main.c (termstate, termflags, global_lock, carrier_alert, select_alert, pty_select_alert, term_bucket, tty_cntl_class, tty_class, cttyid_class, pty_class, pty_cntl_class, termctl, ptyctl, outputq, remote_input_mode, external_processing, term_owner, term_group, term_mode, bottom): Likewise. * usermux/usermux.c (usermux_mapped_time): Rename to usermux_maptime. * lwip/main.c: Include "options.h". (lwip_argp, netif_list): Remove declarations. (lwip_bucket, socketport_class, addrport_class, shutdown_notify_class, lwip_cntl_portclasses, lwip_bootstrap_portclass, lwip_owner, lwip_group, fsys_identity, lwipcntl): New variables. * eth-multiplexer/multiplexer.c (multiplexer_maptime): Add variable. * hostmux/hostmux.c (hostmux_mapped_time): Rename variable to hostmux_maptime * libdiskfs/extra-version.c: Rename file to... * libdiskfs/priv.c: ... new file. (diskfs_shortcut_symlink, diskfs_shortcut_chrdev, diskfs_shortcut_blkdev, diskfs_shortcut_fifo, diskfs_shortcut_ifsock, diskfs_create_symlink_hook, diskfs_read_symlink_hook): Add weak variables. * libdiskfs/Makefile (OTHERSRCS): Replace extra-version.c with priv.c. * libtrivfs/priv.c: New file. * libtrivfs/Makefile (OTHERSRCS): Add priv.c * libcons/extra-version.c: Rename file to... * libcons/priv.c: ... new file. * libcons/Makefile (SRCS): Replace extra-version.c with priv.c. Fix build with #
2017-09-25eth-multiplexer: Avoid copying data multiple times.Justus Winter
* 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.
2017-09-25eth-multiplexer: Remove unused macro.Justus Winter
* eth-multiplexer/vdev.h (MAX_SERVERS): Remove.
2017-09-25eth-multiplexer: Fix debug macro.Justus Winter
* eth-multiplexer/util.h (debug): Avoid format string warning.
2017-09-25eth-multiplexer: Simplify device creation.Justus Winter
* 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.
2017-09-25eth-multiplexer: Remove unused function.Justus Winter
* eth-multiplexer/vdev.c (has_vdev): Drop function. * eth-multiplexer/vdev.h (has_vdev): Drop declaration.
2017-08-24eth-multiplexer: Fix type check.Justus Winter
* eth-multiplexer/device_impl.c (ds_device_open): Check the port class.
2017-08-23Drop the register qualifier.Justus Winter
* console/display.c: Drop 'register'. * eth-multiplexer/dev_stat.c: Likewise. * libbpf/bpf_impl.c: Likewise. * libbpf/queue.c: Likewise. * libports/manage-multithread.c: Likewise. * libports/manage-one-thread.c: Likewise.
2017-08-23eth-multiplexer: Respect interfaces up flags.Justus Winter
* 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.
2017-08-23eth-multiplexer: Allow setting of flags.Justus Winter
* eth-multiplexer/dev_stat.c (wants_all_multi_p): New function. (vdev_setstat): Likewise. * eth-multiplexer/device_impl.c (ds_device_set_status): Use new function. * eth-multiplexer/vdev.h (vdev_setstat): New declaration.
2017-08-23eth-multiplexer: Generalize function and improve error handling.Justus Winter
* eth-multiplexer/ethernet.c (set_promisc): Rename to 'eth_set_clear_flags' and generalize. (ethernet_open): Adapt call site. (ethernet_close): Likewise. * eth-multiplexer/ethernet.h (eth_set_clear_flags): New declaration.
2017-08-23eth-multiplexer: Remove local definiton.Justus Winter
* eth-multiplexer/ethernet.c (NET_FLAGS): Drop macro.
2017-08-22eth-multiplexer: Implement getting the devices flags.Justus Winter
* eth-multiplexer/dev_stat.c (dev_getstat): Implement the NET_FLAGS flavor.
2017-08-22eth-multiplexer: Fix error handling.Justus Winter
* eth-multiplexer/device_impl.c (ds_device_write): Do not deallocate data, it is destroyed by the server loop ("consume-on-success").
2017-08-05Use our own variant of 'assert' and 'assert_perror'.Justus Winter
Our variants print stack traces on failures. This will make locating errors much easier.
2017-04-08eth-multiplexer: Fix iohelp missing dependency.Manolis Ragkousis
* eth-multiplexer/Makefile (HURDLIBS): Add iohelp.
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.