search for: ip_checksum

Displaying 5 results from an estimated 5 matches for "ip_checksum".

Did you mean: ip6_checksum
2020 Mar 28
0
[klibc:master] ipconfig: Fix alignment of packet structure
...; --- usr/kinit/ipconfig/packet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/usr/kinit/ipconfig/packet.c b/usr/kinit/ipconfig/packet.c index 20018010..2e1487d2 100644 --- a/usr/kinit/ipconfig/packet.c +++ b/usr/kinit/ipconfig/packet.c @@ -86,7 +86,7 @@ static unsigned int ip_checksum(uint16_t *hdr, int len) struct header { struct iphdr ip; struct udphdr udp; -} __attribute__ ((packed)); +} __attribute__ ((packed, aligned(4))); static struct header ipudp_hdrs = { .ip = {
2011 Jul 08
4
[PATCH 0/4] usr/kinit checkpatch
Various coding style fixes checkpatch warns about. The goal is not to be 100% checkpatch compliant, but to have more consistent coding style. As this is a trivial patch serie, will land in 24 hours in klibc git, unless of course ml review hits a bugger. Checked with size(3) that the generated kinit, fstype, ipconfig and nfsmount are the same. maximilian attems (4): [klibc] ipconfig: reduce
2017 Feb 04
0
[PATCH] ipconfig: handle multiple interfaces correctly
...l)); + if (-1 == rv) { + perror("bind"); + close(fd); + return -1; + } + dev->pkt_fd = fd; return fd; } -void packet_close(void) +void packet_close(struct netdev *dev) { - close(pkt_fd); - pkt_fd = -1; + close(dev->pkt_fd); + dev->pkt_fd = -1; } static unsigned int ip_checksum(uint16_t *hdr, int len) @@ -163,7 +170,7 @@ int packet_send(struct netdev *dev, struct iovec *iov, int iov_len) dprintf("\n bytes %d\n", len); - return sendmsg(pkt_fd, &msg, 0); + return sendmsg(dev->pkt_fd, &msg, 0); } void packet_discard(struct netdev *dev) @@ -17...
2019 Jan 18
0
[klibc:master] ipconfig: handle multiple interfaces correctly
...l)); + if (-1 == rv) { + perror("bind"); + close(fd); + return -1; + } + dev->pkt_fd = fd; return fd; } -void packet_close(void) +void packet_close(struct netdev *dev) { - close(pkt_fd); - pkt_fd = -1; + close(dev->pkt_fd); + dev->pkt_fd = -1; } static unsigned int ip_checksum(uint16_t *hdr, int len) @@ -163,7 +170,7 @@ int packet_send(struct netdev *dev, struct iovec *iov, int iov_len) dprintf("\n bytes %d\n", len); - return sendmsg(pkt_fd, &msg, 0); + return sendmsg(dev->pkt_fd, &msg, 0); } void packet_discard(struct netdev *dev) @@ -17...
2017 Dec 31
4
[PATCH klibc 0/4] Fixes from Debian and Ubuntu
The following patches come from Debian and/or Ubuntu packages of klibc. Ben. Ben Hutchings (1): [klibc] run-init: Add dry-run mode Jay Vosburgh (1): [klibc] ipconfig: Use separate sockets for DHCP from multiple interfaces Mathieu Trudel-Lapierre (1): [klibc] ipconfig: Set broadcast when sending DHCPREQUEST and DHCPDISCOVER YunQiang Su (1): [klibc] mips: setjmp.S: don't