aboutsummaryrefslogtreecommitdiff
path: root/lwip
Commit message (Collapse)AuthorAgeFilesLines
* lwip: Drop spurious port deref on errorSamuel Thibault2023-05-281-2/+2
| | | | When ports_create_port returns an error there is no reference to release.
* lwip: Fix port leak on /servers/startup lookup errorSamuel Thibault2023-05-281-1/+4
|
* More prototypes fixesSamuel Thibault2023-05-102-12/+12
|
* Use uintptr_t for message payloads.Flavio Cruz2023-05-021-2/+2
| | | | | A follow up to 92fad38a043b75ed6b435b3efa574ede91dbe9ee in gnumach. Message-Id: <ZFCNasf9bJ9qj+CG@jupiter.tail36e24.ts.net>
* Further modernize Hurd code by enforcing strict prototypes and no implicit ↵Flavio Cruz2023-04-083-3/+3
| | | | | | | | | | | | | | | | | | function declarations. Most of the changes land in one of these buckets: * Removed unused declarations. * Used (void) to represent no parameters instead of () which means an undeterminate number of parameters. * Included missing header files whenever necessary (stdlib.h, sys/mman.h, etc) * Typedefed function pointers to be able to fully declare the parameter types. * Added declarations of library functions that are used elsewhere (example is libps/ps.h). * Made functions static whenever they are only used in that file. * Forwarded declarations of some methods that were made static. Message-Id: <ZDD1o7/tVYeZew+G@jupiter.tail36e24.ts.net>
* Modernize code by removing use of old style definitions.Flavio Cruz2023-04-034-5/+5
| | | | | Also add -Werror=old-style-definition to enforce new code. Message-Id: <ZBZ+8xf7GHy2RT/h@jupiter.tail36e24.ts.net>
* lwip: Fix warningSamuel Thibault2022-09-221-2/+2
|
* rioctl: Use r not i group ioctl for SIOCADDRT/SIOCDELRTDamien Zammit2022-09-224-3/+8
| | | | Message-Id: <20220922004105.961869-1-damien@zamaudio.com>
* lwip: Add missing stubDamien Zammit2022-09-221-0/+10
| | | | Message-Id: <20220922004018.961808-1-damien@zamaudio.com>
* lwip: Add stubs for route ioctlsSamuel Thibault2022-08-301-0/+18
|
* Fix types of read write and readables methodsSamuel Thibault2022-08-303-8/+8
| | | | This completes 5adb4b834b1e
* Fix const warningsSamuel Thibault2022-01-172-2/+2
| | | | | Now that the RPCs have const, this forces us cleaning our const-meant functions.
* Make RPC input array parameters constSamuel Thibault2022-01-164-17/+17
| | | | | This follows mig's cf4bcc3f1435 ("Also add const qualifiers on server side")
* Fix build warningsSamuel Thibault2022-01-013-3/+3
| | | | No actual behavior change.
* Fix build with -fno-commonSamuel Thibault2020-03-315-16/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 #
* lwip,pfinet: Make S_io_reauthenticate return errorSamuel Thibault2020-01-051-1/+1
| | | | | | * lwip/io-ops.c (lwip_S_io_reauthenticate): Return errno on make_sock_user returning an error. * pfinet/io-ops.c (S_io_reauthenticate): Likewise.
* lwip,pfinet: Fix crash on make_sock_user getting EINTRSamuel Thibault2020-01-052-2/+9
| | | | | | | | | | | _ports_create_port_internal may return EINTR. * lwip/port-objs.c (make_sock_user): Set errno when ports_create_port returns an error. * pfinet/socket.c (make_sock_user): Likewise. * lwip/io-ops.c (lwip_S_io_reauthenticate): Loop while make_sock_user errors with EINTR. * pfinet/io-ops.c (S_io_reauthenticate): Likewise.
* lwip: Call if_change_flags() inside a thread-safe contextJoan Lledó2019-08-121-5/+55
| | | | | | | * lwip/port/netif/ifcommon.c: * Changing flags for a device (e.g. by inetutils-ifconfig) now takes the big lock to ensure the stack is not doing anything else. Message-Id: <20190622100002.11399-2-jlledom@member.fsf.org>
* lwip: Fix bug: Error handling on configure_device()Joan Lledó2019-05-111-5/+3
| | | | | | | * lwip/lwip-util.c: * EINVAL was never being returned. * Return error code for tcpip_callback() as errno. Message-Id: <20190511093202.9763-2-jlledom@member.fsf.org>
* lwip: Set output flags when calling recv()Joan Lledó2019-05-041-8/+13
| | | | | | | | Lwip 2.1.2 added a new function lwip_recvmsg() which writes out flags for the recv() operation. * lwip/socket-ops.c: Call lwip_recvmsg() instead of lwip_recvfrom(). Message-Id: <20190504082505.7002-2-jlledom@member.fsf.org>
* lwip: Fix bug: Clear MSG_NOSIGNAL flag when calling send().Joan Lledó2019-05-041-5/+8
| | | | | | | | | | | Lwip 2.1.2 added a new assertion to ensure that no unsupported flags are being sent to lwip_sendmsg(). MSG_NOSIGNAL is one of these flags and name resolving stopped working. * lwip/socket-ops.c: lwip_S_socket_send(): Clear MSG_NOSIGNAL to ensure is not sent to lwip_sendmsg(). Message-Id: <20190504081959.6463-2-jlledom@member.fsf.org>
* lwip: Error handling when calling update_if()Joan Lledó2019-05-021-29/+33
| | | | | | | * lwip/lwip-util.c: * Check for errors when calling update_if() inside a thread-safe context. Message-Id: <20190502095502.10926-4-jlledom@member.fsf.org>
* lwip: Stop using netifapi.Joan Lledó2019-03-313-36/+55
| | | | | | | | | | | | | | Use tcpip_callback() to reconfigure interfaces in a thread-safe context instead. * lwip/lwip-util.c: * Replace all netifapi calls by their non-netifapi versions. * update_ifs() is called through tcpip_callback(). * lwip/options.c: * Call init_fs() through tcpip_callback(). * lwip/port/netif/ifcommon.c: * Replace all netifapi calls by their non-netifapi versions. Message-Id: <20190331175541.7095-5-jlledom@member.fsf.org>
* lwip: Add headers to the tun driverJoan Lledó2019-03-311-0/+3
| | | | | | | | Since O_CREAT and pals are not included for other headers anymore * lwip/port/netif/hurdtunif.c: * Include sys/types.h, sys/stat.h and fcntl.h Message-Id: <20190331175541.7095-4-jlledom@member.fsf.org>
* lwip: Use the right error type.Joan Lledó2019-03-3110-23/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use lwip's err_t as return type for functions called from lwip and error_t for functions called from the translator. * lwip/io-ops.c: Include <errno.h> * as is not being included for other headers anymore. * lwip/lwip-util.h: Likewise. * lwip/port/include/netif/hurdethif.h: * Include <errno.h> * Change the return type of the init function to err_t. * lwip/port/include/netif/hurdloopif.h: Liekwise. * lwip/port/include/netif/hurdtunif.h: Likewise. * lwip/port/include/netif/ifcommon.h: Likewise. * lwip/port/netif/ifcommon.c: Likewise. * lwip/port/netif/hurdloopif.c: * Include <errno.h> * Change output function return type to err_t. * Return lwip's err_t codes. * lwip/port/netif/hurdethif.c: * Include <errno.h> * Change init function return type to err_t. * Change output function return type to err_t. * Return lwip's err_t codes. * lwip/port/netif/hurdtunif.c: Likewise. Message-Id: <20190331175541.7095-3-jlledom@member.fsf.org>
* lwip: Fix wrong error checksJoan Lledó2019-03-312-4/+4
| | | | | | | | * lwip/lwip-util.c: init_ifs(): * Check for the value of ifc instead of in->dev_name * lwip/port/netif/ifcommon.c: * if_init(), if_terminate(): Check for null on ifc instead of netif Message-Id: <20190331175541.7095-2-jlledom@member.fsf.org>
* lwip: Fix build against glibc 2.28Samuel Thibault2018-08-151-0/+1
| | | | lwip/startup.c: Include <signal.h>.
* lwip: Fix a buffer overflow and clear compiler warningsJoan Lledó2018-08-142-2/+2
| | | | | | | GCC 8 new warning -Wstringop-truncation detected some buffer overflows. * lwip/options.c (parse_opt): Fix the buffer overflow. * lwip/pfinet-ops.c (dev_ifconf): Likewise.
* lwip: return EINTR when a select() IPC thread is cancelledJoan Lledó2018-08-141-0/+8
| | | | | | | Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): Detect when the current RPC is cancelled by checking the reply port.
* lwip: refactor main demuxer to avoid code duplicationJoan Lledó2018-08-141-31/+11
| | | | * lwip/main.c (lwip_demuxer): Refactored.
* lwip: poll(): return EIO when POLLERR is setJoan Lledó2018-08-141-0/+3
| | | | | | | Needed to properly support poll in glibc (_hurd_select). * lwip/io-ops.c (lwip_io_select_common): If POLLERR is set, return EIO.
* lwip translator: Remove unused reference to config.hJoan Lledó2018-05-021-1/+0
|
* Include required sockets headersJoan Lledó2018-05-014-0/+6
| | | | | | | * lwip/iioctl-ops.c: Include <lwip/inet.h>. * lwip/lwip-util.c: Likewise. * lwip/pfinet-ops.c: Include <lwip/sockets.h> and <lwip/inet.h>. * lwip/port/netif/hurdethif.c: Likewise.
* lwip: Add LwIP-based TCP/IP translatorJoan Lledó2017-12-1825-0/+4876
* Makefile (prog-subdirs): Add lwip. * config.make.in (HAVE_LIBLWIP, liblwip_CFLAGS, liblwip_LIBS): Define variables. * configure.ac: Check for liblwip. * lwip/: New directory.