Displaying 5 results from an estimated 5 matches for "ipudp_hdr".
Did you mean:
ipudp_hdrs
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
2010 Apr 26
1
valgrind ipconfig work
...t i, len = 0;
+ struct msghdr msg;
+
+ memset(&sll, 0, sizeof(sll));
+
+ msg.msg_name = &sll;
+ msg.msg_namelen = sizeof(sll);
+ msg.msg_iov = iov;
+ msg.msg_iovlen = iov_len;
+ msg.msg_control = NULL;
+ msg.msg_controllen = 0;
+ msg.msg_flags = 0;
if (cfg_local_port != LOCAL_PORT) {
ipudp_hdrs.udp.source = htons(cfg_local_port);
2003 Apr 29
0
[PATCH] Fix busy-looping behaviour in ipconfig
...OADCAST,
},
.udp = {
- .source = __constant_htons(68),
- .dest = __constant_htons(67),
+ .source = __constant_htons(LOCAL_PORT),
+ .dest = __constant_htons(REMOTE_PORT),
.len = 0,
.check = 0,
},
@@ -108,6 +112,11 @@
};
int i, len = 0;
+ if (local_port != LOCAL_PORT) {
+ ipudp_hdrs.udp.source = htons(local_port);
+ ipudp_hdrs.udp.dest = htons(remote_port);
+ }
+
/*
* Glue in the ip+udp header iovec
*/
@@ -160,11 +169,21 @@
return 0;
discard_pkt:
- recvfrom(pkt_fd, &iph, sizeof(struct iphdr),
- 0, (struct sockaddr *)&sll, &sllen);
+ packet_discar...
2020 Mar 28
0
[klibc:master] ipconfig: Fix alignment of packet structure
...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 = {
2010 Jul 07
0
[git pull v2] x86_32, sh4, getrusage()
...struct msghdr msg;
int i, len = 0;
+ memset(&sll, 0, sizeof(sll));
+ msg.msg_name = &sll;
+ msg.msg_namelen = sizeof(sll);
+ msg.msg_iov = iov;
+ msg.msg_iovlen = iov_len;
+ msg.msg_control = NULL;
+ msg.msg_controllen = 0;
+ msg.msg_flags = 0;
+
if (cfg_local_port != LOCAL_PORT) {
ipudp_hdrs.udp.source = htons(cfg_local_port);
ipudp_hdrs.udp.dest = htons(cfg_remote_port);
commit 617cba04b94cae042f71eb37c0a620587783a660
Author: Mike Waychison <mikew at google.com>
Date: Mon Jun 7 16:30:34 2010 -0700
[klibc] Add ancillary data structures and macros to sys/socket.h...