mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-02 15:25:48 +00:00
Print a little more info on where BOOTREQUESTs are coming from and where BOOTREPLYs are going to.
This commit is contained in:
17
bootp.c
17
bootp.c
@@ -63,9 +63,15 @@ void bootp (packet)
|
|||||||
struct iaddr ip_address;
|
struct iaddr ip_address;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
note ("BOOTREQUEST from %s", print_hw_addr (packet -> raw -> htype,
|
note ("BOOTREQUEST from %s via %s",
|
||||||
|
print_hw_addr (packet -> raw -> htype,
|
||||||
packet -> raw -> hlen,
|
packet -> raw -> hlen,
|
||||||
packet -> raw -> chaddr));
|
packet -> raw -> chaddr),
|
||||||
|
packet -> raw -> giaddr.s_addr
|
||||||
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
|
: packet -> interface -> name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
locate_network (packet);
|
locate_network (packet);
|
||||||
|
|
||||||
@@ -214,11 +220,14 @@ void bootp (packet)
|
|||||||
memcpy (hto.haddr, packet -> raw -> chaddr, hto.hlen);
|
memcpy (hto.haddr, packet -> raw -> chaddr, hto.hlen);
|
||||||
|
|
||||||
/* Report what we're doing... */
|
/* Report what we're doing... */
|
||||||
note ("BOOTREPLY for %s to %s",
|
note ("BOOTREPLY for %s to %s via %s",
|
||||||
inet_ntoa (raw.yiaddr),
|
inet_ntoa (raw.yiaddr),
|
||||||
print_hw_addr (packet -> raw -> htype,
|
print_hw_addr (packet -> raw -> htype,
|
||||||
packet -> raw -> hlen,
|
packet -> raw -> hlen,
|
||||||
packet -> raw -> chaddr));
|
packet -> raw -> chaddr),
|
||||||
|
packet -> raw -> giaddr.s_addr
|
||||||
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
|
: packet -> interface -> name);
|
||||||
|
|
||||||
/* Set up the parts of the address that are in common. */
|
/* Set up the parts of the address that are in common. */
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
|
@@ -63,9 +63,15 @@ void bootp (packet)
|
|||||||
struct iaddr ip_address;
|
struct iaddr ip_address;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
note ("BOOTREQUEST from %s", print_hw_addr (packet -> raw -> htype,
|
note ("BOOTREQUEST from %s via %s",
|
||||||
|
print_hw_addr (packet -> raw -> htype,
|
||||||
packet -> raw -> hlen,
|
packet -> raw -> hlen,
|
||||||
packet -> raw -> chaddr));
|
packet -> raw -> chaddr),
|
||||||
|
packet -> raw -> giaddr.s_addr
|
||||||
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
|
: packet -> interface -> name);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
locate_network (packet);
|
locate_network (packet);
|
||||||
|
|
||||||
@@ -214,11 +220,14 @@ void bootp (packet)
|
|||||||
memcpy (hto.haddr, packet -> raw -> chaddr, hto.hlen);
|
memcpy (hto.haddr, packet -> raw -> chaddr, hto.hlen);
|
||||||
|
|
||||||
/* Report what we're doing... */
|
/* Report what we're doing... */
|
||||||
note ("BOOTREPLY for %s to %s",
|
note ("BOOTREPLY for %s to %s via %s",
|
||||||
inet_ntoa (raw.yiaddr),
|
inet_ntoa (raw.yiaddr),
|
||||||
print_hw_addr (packet -> raw -> htype,
|
print_hw_addr (packet -> raw -> htype,
|
||||||
packet -> raw -> hlen,
|
packet -> raw -> hlen,
|
||||||
packet -> raw -> chaddr));
|
packet -> raw -> chaddr),
|
||||||
|
packet -> raw -> giaddr.s_addr
|
||||||
|
? inet_ntoa (packet -> raw -> giaddr)
|
||||||
|
: packet -> interface -> name);
|
||||||
|
|
||||||
/* Set up the parts of the address that are in common. */
|
/* Set up the parts of the address that are in common. */
|
||||||
to.sin_family = AF_INET;
|
to.sin_family = AF_INET;
|
||||||
|
Reference in New Issue
Block a user