summaryrefslogtreecommitdiffstats
path: root/src/net/dhcpopts.c
diff options
context:
space:
mode:
authorMichael Brown2006-07-19 19:58:27 +0200
committerMichael Brown2006-07-19 19:58:27 +0200
commit3369f930363f641d586f1bb56fd0b9d14a99bfa3 (patch)
tree50cde035878bc3c2ea9d713dbde786ed58139944 /src/net/dhcpopts.c
parentAdded some debug messages and DHCP test code (diff)
downloadipxe-3369f930363f641d586f1bb56fd0b9d14a99bfa3.tar.gz
ipxe-3369f930363f641d586f1bb56fd0b9d14a99bfa3.tar.xz
ipxe-3369f930363f641d586f1bb56fd0b9d14a99bfa3.zip
Add block identification to debug messages
Diffstat (limited to 'src/net/dhcpopts.c')
-rw-r--r--src/net/dhcpopts.c20
1 files changed, 12 insertions, 8 deletions
diff --git a/src/net/dhcpopts.c b/src/net/dhcpopts.c
index 3efb5cf4..4f67f846 100644
--- a/src/net/dhcpopts.c
+++ b/src/net/dhcpopts.c
@@ -153,8 +153,9 @@ find_dhcp_option_with_encap ( struct dhcp_option_block *options,
break;
/* Check for matching tag */
if ( option->tag == tag ) {
- DBG ( "Found DHCP option %s (length %d)\n",
- dhcp_tag_name ( original_tag ), option->len );
+ DBG ( "Found DHCP option %s (length %d) in block %p\n",
+ dhcp_tag_name ( original_tag ), option->len,
+ options );
return option;
}
/* Check for explicit end marker */
@@ -221,8 +222,8 @@ void register_dhcp_options ( struct dhcp_option_block *options ) {
/* Determine priority of new block */
options->priority = find_dhcp_num_option ( options, DHCP_EB_PRIORITY );
- DBG ( "Registering DHCP options block with priority %d\n",
- options->priority );
+ DBG ( "Registering DHCP options block %p with priority %d\n",
+ options, options->priority );
/* Insert after any existing blocks which have a higher priority */
list_for_each_entry ( existing, &option_blocks, list ) {
@@ -260,6 +261,9 @@ void init_dhcp_options ( struct dhcp_option_block *options,
option = options->data;
option->tag = DHCP_END;
options->len = 1;
+
+ DBG ( "DHCP options block %p initialised (data %p max_len %#zx)\n",
+ options, options->data, options->max_len );
}
/**
@@ -365,12 +369,12 @@ struct dhcp_option * set_dhcp_option ( struct dhcp_option_block *options,
option = find_dhcp_option_with_encap ( options, tag, &encapsulator );
if ( option ) {
old_len = dhcp_option_len ( option );
- DBG ( "Resizing DHCP option %s from length %d to %d\n",
- dhcp_tag_name ( tag ), option->len, len );
+ DBG ( "Resizing DHCP option %s from length %d to %d in block "
+ "%p\n", dhcp_tag_name (tag), option->len, len, options );
} else {
old_len = 0;
- DBG ( "Creating DHCP option %s (length %d)\n",
- dhcp_tag_name ( tag ), new_len );
+ DBG ( "Creating DHCP option %s (length %d) in block %p\n",
+ dhcp_tag_name ( tag ), len, options );
}
/* Ensure that encapsulator exists, if required */