diff options
Diffstat (limited to 'libnet/include/libnet')
-rw-r--r-- | libnet/include/libnet/libnet-functions.h | 16 | ||||
-rw-r--r-- | libnet/include/libnet/libnet-headers.h | 6 |
2 files changed, 11 insertions, 11 deletions
diff --git a/libnet/include/libnet/libnet-functions.h b/libnet/include/libnet/libnet-functions.h index eff534e..949aaa4 100644 --- a/libnet/include/libnet/libnet-functions.h +++ b/libnet/include/libnet/libnet-functions.h @@ -1476,9 +1476,9 @@ libnet_ptag_t ptag); * @param yip * @param sip * @param gip - * @param chaddr - * @param sname - * @param file + * @param chaddr, client hardware address, length is hlen + * @param sname, server host name, a null terminated string + * @param file, boot file name, a null terminated string * @param payload optional payload or NULL * @param payload_s payload length or 0 * @param l pointer to a libnet context @@ -1489,7 +1489,7 @@ libnet_ptag_t libnet_build_dhcpv4(uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, -uint8_t *sname, const uint8_t *file, const uint8_t* payload, uint32_t payload_s, +const char *sname, const char *file, const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag); /** @@ -1504,9 +1504,9 @@ libnet_t *l, libnet_ptag_t ptag); * @param yip * @param sip * @param gip - * @param chaddr - * @param sname - * @param file + * @param chaddr, client hardware address, length is hlen + * @param sname, server host name, a null terminated string + * @param file, boot file name, a null terminated string * @param payload optional payload or NULL * @param payload_s payload length or 0 * @param l pointer to a libnet context @@ -1517,7 +1517,7 @@ libnet_ptag_t libnet_build_bootpv4(uint8_t opcode, uint8_t htype, uint8_t hlen, uint8_t hopcount, uint32_t xid, uint16_t secs, uint16_t flags, uint32_t cip, uint32_t yip, uint32_t sip, uint32_t gip, const uint8_t *chaddr, -uint8_t *sname, const uint8_t *file, const uint8_t* payload, uint32_t payload_s, +const char *sname, const char *file, const uint8_t* payload, uint32_t payload_s, libnet_t *l, libnet_ptag_t ptag); /** diff --git a/libnet/include/libnet/libnet-headers.h b/libnet/include/libnet/libnet-headers.h index 009c6cf..11065c7 100644 --- a/libnet/include/libnet/libnet-headers.h +++ b/libnet/include/libnet/libnet-headers.h @@ -364,9 +364,9 @@ struct libnet_dhcpv4_hdr uint32_t dhcp_yip; /* your IP */ uint32_t dhcp_sip; /* server's IP */ uint32_t dhcp_gip; /* gateway IP */ - uint8_t dhcp_chaddr[16]; /* client hardware address */ - uint8_t dhcp_sname[64]; /* server host name */ - uint8_t dhcp_file[128]; /* boot file name */ + uint8_t dhcp_chaddr[16]; /* client hardware address, len is dhcp_hlen */ + char dhcp_sname[64]; /* server host name, null terminated string */ + char dhcp_file[128]; /* boot file name, null terminated string */ uint32_t dhcp_magic; /* BOOTP magic header */ #define DHCP_MAGIC 0x63825363 #define LIBNET_BOOTP_MIN_LEN 0x12c |