[syslinux:master] dump-pxe: dumping part of the dhcpdata structure

syslinux-bot for Erwan Velu erwanaliasr1 at gmail.com
Mon Apr 25 15:28:14 PDT 2011


Commit-ID:  7561c21cdc63e78d1ac700c43e25fcaea40e0575
Gitweb:     http://syslinux.zytor.com/commit/7561c21cdc63e78d1ac700c43e25fcaea40e0575
Author:     Erwan Velu <erwanaliasr1 at gmail.com>
AuthorDate: Tue, 22 Mar 2011 22:16:30 +0100
Committer:  Erwan Velu <erwanaliasr1 at gmail.com>
CommitDate: Tue, 22 Mar 2011 22:16:30 +0100

dump-pxe: dumping part of the dhcpdata structure

This is a nice info as it gives the next-server ip.


---
 com32/hdt/hdt-dump-pxe.c |    4 ++++
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/com32/hdt/hdt-dump-pxe.c b/com32/hdt/hdt-dump-pxe.c
index 2192184..9e24b7c 100644
--- a/com32/hdt/hdt-dump-pxe.c
+++ b/com32/hdt/hdt-dump-pxe.c
@@ -29,6 +29,7 @@
 #include "hdt-common.h"
 #include "hdt-dump.h"
 #include <sys/gpxe.h>
+#include <netinet/in.h>
 
 void dump_pxe(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item) {
 
@@ -67,6 +68,9 @@ void dump_pxe(struct s_hardware *hardware, ZZJSON_CONFIG *config, ZZJSON **item)
 			hardware->pxe.ip_addr[1],
 			hardware->pxe.ip_addr[2],
 			hardware->pxe.ip_addr[3]);
+	add_s("pxe.client_ip",inet_ntoa(hardware->pxe.dhcpdata.cip));
+	add_s("pxe.next_server_ip",inet_ntoa(hardware->pxe.dhcpdata.sip));
+	add_s("pxe.relay_agent_ip",inet_ntoa(hardware->pxe.dhcpdata.gip));
 	add_s("pxe.ipaddr",ip);
 	add_b("gpxe_detected",is_gpxe());
 	flush("pxe",config,item);



More information about the Syslinux-commits mailing list