Date: Fri, 29 Oct 1999 22:14:01 +0200 (CEST) From: Wilko Bulte <wilko@yedi.iaf.nl> To: FreeBSD-hackers@freebsd.org (FreeBSD hackers list) Subject: bootpd on Alpha / alignment problems Message-ID: <199910292014.WAA31440@yedi.iaf.nl>
next in thread | raw e-mail | index | archive | help
On Alpha the bootpd does not work, it assert-fails on the size of the struct bootp being != to BP_MINPKTSZ. A bit of debugging reveals: alpine#./bootpd -d9 sizeof struct bootp=312, BP_MINPKTSZ=300 bootpd: info(6): bootptab mtime: Fri Oct 29 20:10:09 1999 bootpd: info(6): reading "/etc/bootptab" bootpd: info(6): read 1 entries (1 hosts) from "/etc/bootptab" My best bet is that the Alpha alignment inside the struct results in a bigger bootp struct. I am, however, not sure on what the right way is to fix this. Comments appreciated, Wilko ======= #define BP_MINPKTSZ 300 /* to check sizeof(struct bootp) */ struct bootp { unsigned char bp_op; /* packet opcode type */ unsigned char bp_htype; /* hardware addr type */ unsigned char bp_hlen; /* hardware addr length */ unsigned char bp_hops; /* gateway hops */ unsigned int32 bp_xid; /* transaction ID */ unsigned short bp_secs; /* seconds since boot began */ unsigned short bp_flags; /* RFC1532 broadcast, etc. */ struct in_addr bp_ciaddr; /* client IP address */ struct in_addr bp_yiaddr; /* 'your' IP address */ struct in_addr bp_siaddr; /* server IP address */ struct in_addr bp_giaddr; /* gateway IP address */ unsigned char bp_chaddr[BP_CHADDR_LEN]; /* client hardware address */ char bp_sname[BP_SNAME_LEN]; /* server host name */ char bp_file[BP_FILE_LEN]; /* boot file name */ unsigned char bp_vend[BP_VEND_LEN]; /* vendor-specific area */ /* note that bp_vend can be longer, extending to end of packet. */ }; /* -- | / o / / _ Arnhem, The Netherlands - Powered by FreeBSD - |/|/ / / /( (_) Bulte WWW : http://www.tcja.nl http://www.freebsd.org To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199910292014.WAA31440>