mirror of
https://gitlab.isc.org/isc-projects/dhcp
synced 2025-09-01 23:05:29 +00:00
Remove dump_packet function (moved to print.c)
This commit is contained in:
36
dhcpd.c
36
dhcpd.c
@@ -251,42 +251,6 @@ void do_packet (packbuf, len, from_port, from, sock)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_packet (tp)
|
|
||||||
struct packet *tp;
|
|
||||||
{
|
|
||||||
struct dhcp_packet *tdp = tp -> raw;
|
|
||||||
|
|
||||||
debug ("op = %d htype = %d hlen = %d hops = %d",
|
|
||||||
tdp -> op, tdp -> htype, tdp -> hlen, tdp -> hops);
|
|
||||||
debug ("xid = %x secs = %d flags = %x",
|
|
||||||
tdp -> xid, tdp -> secs, tdp -> flags);
|
|
||||||
debug ("ciaddr = %s yiaddr = %s",
|
|
||||||
inet_ntoa (tdp -> ciaddr), inet_ntoa (tdp -> yiaddr));
|
|
||||||
debug ("siaddr = %s giaddr = %s",
|
|
||||||
inet_ntoa (tdp -> siaddr), inet_ntoa (tdp -> giaddr));
|
|
||||||
debug ("chaddr = %02.2x:%02.2x:%02.2x:%02.2x:%02.2x:%02.2x",
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [0],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [1],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [2],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [3],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [4],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [5]);
|
|
||||||
debug ("filename = %s\n", tdp -> file);
|
|
||||||
debug ("server_name = %s\n", tdp -> sname);
|
|
||||||
if (tp -> options_valid) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 256; i++) {
|
|
||||||
if (tp -> options [i].data)
|
|
||||||
printf (" %s = %s\n",
|
|
||||||
dhcp_options [i].name,
|
|
||||||
pretty_print_option
|
|
||||||
(i, tp -> options [i].data,
|
|
||||||
tp -> options [i].len));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Based on the contents of packet, figure out which interface address
|
/* Based on the contents of packet, figure out which interface address
|
||||||
to use from server_addrlist. Currently just picks the first
|
to use from server_addrlist. Currently just picks the first
|
||||||
interface. */
|
interface. */
|
||||||
|
@@ -251,42 +251,6 @@ void do_packet (packbuf, len, from_port, from, sock)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void dump_packet (tp)
|
|
||||||
struct packet *tp;
|
|
||||||
{
|
|
||||||
struct dhcp_packet *tdp = tp -> raw;
|
|
||||||
|
|
||||||
debug ("op = %d htype = %d hlen = %d hops = %d",
|
|
||||||
tdp -> op, tdp -> htype, tdp -> hlen, tdp -> hops);
|
|
||||||
debug ("xid = %x secs = %d flags = %x",
|
|
||||||
tdp -> xid, tdp -> secs, tdp -> flags);
|
|
||||||
debug ("ciaddr = %s yiaddr = %s",
|
|
||||||
inet_ntoa (tdp -> ciaddr), inet_ntoa (tdp -> yiaddr));
|
|
||||||
debug ("siaddr = %s giaddr = %s",
|
|
||||||
inet_ntoa (tdp -> siaddr), inet_ntoa (tdp -> giaddr));
|
|
||||||
debug ("chaddr = %02.2x:%02.2x:%02.2x:%02.2x:%02.2x:%02.2x",
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [0],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [1],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [2],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [3],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [4],
|
|
||||||
((unsigned char *)(tdp -> chaddr)) [5]);
|
|
||||||
debug ("filename = %s\n", tdp -> file);
|
|
||||||
debug ("server_name = %s\n", tdp -> sname);
|
|
||||||
if (tp -> options_valid) {
|
|
||||||
int i;
|
|
||||||
|
|
||||||
for (i = 0; i < 256; i++) {
|
|
||||||
if (tp -> options [i].data)
|
|
||||||
printf (" %s = %s\n",
|
|
||||||
dhcp_options [i].name,
|
|
||||||
pretty_print_option
|
|
||||||
(i, tp -> options [i].data,
|
|
||||||
tp -> options [i].len));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Based on the contents of packet, figure out which interface address
|
/* Based on the contents of packet, figure out which interface address
|
||||||
to use from server_addrlist. Currently just picks the first
|
to use from server_addrlist. Currently just picks the first
|
||||||
interface. */
|
interface. */
|
||||||
|
Reference in New Issue
Block a user