[En-Nut-Discussion] DHCP option one byte offset (Big Endian)?

Tyou tyou at i-da.co.jp
Mon Jul 28 07:22:55 CEST 2003


Hi, frds,
 I've encountered new problem in sample tcps.c
In the following log by Ethereal:
 Received MASK :4.255.255.255
 Received GATE :4.192.168.1
I think they should be 255.255.255.255 and 192.168.1.255.
Is there one byte offset wrong?
Is the function NutDhcpParse only for Little endian?

Btw, my purpose is trying to make ethernut a platform 
independent embed OS and TCP/IP stack as best as it can,
Does anyone have interest about it? Although I know 
there are already such RTOS/STACK easy for porting, it 
is still meaningful to study ethernut, the clear 
concept and BSD style Embedded OS and to get some
experience meanwhile. 
Regards,
Tyou
**** Ip Packet Input ***
 IP protocol type : UDP
 +-----------IP HEADER-----------+
 | 4 | 5 |    0  |       332     | (v, hl, tos, len)
 +-------------------------------+
 |  192  |  168  |    1  |    3  | (src)
 +-------------------------------+
 |  255  |  255  |  255  |  255  | (dest)
 +-------------------------------+
NutDhcpClient Thread dump bootp:: length n = 304
 Packet opcode type: 1=request, 2=reply : 2
 Hardware address type: 1=Ethernet      : 1
 Hardware address length: 6 for Ethernet: 6
 Gateway hops                           : 0
 Transaction ID                         : 0140042E
 Seconds since boot began               : 0
 RFC1532 broadcast, etc.                : 4294934528
 Client IP address                      : 0.0.0.0
 'Your' IP address                      : 192.168.1.31
 Server IP address                      : 192.168.1.3
 Gateway IP address                     : 0.0.0.0
 Server host name   64                  :
 Boot file name     128                 :

DHCP dhcpDone -- got an offer

 Received IP   :192.168.1.31
 Received MASK :4.255.255.255
 Received GATE :4.192.168.1

DHCP dhcpDone !!!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.egnite.de/pipermail/en-nut-discussion/attachments/20030728/2aeea2d5/attachment.html>


More information about the En-Nut-Discussion mailing list