Only reason I hardcoded the length was that it removes a call to strlen even though we know the string length.
Makes code smaller also joolz -----Original Message----- From: Frédéric BERNON [mailto:[EMAIL PROTECTED] Sent: 23 March 2007 14:29 To: Mailing list for lwIP users Subject: RE : [lwip-users] DHCP Modifications I test it, and it's work. Just I donc think that using a hardcoded string/length is good (DHCP register the name, and DNS is update by DHCP). Perhaps it will be better to extend dhcp or netif struct with one field (hostname) if a LWIP_DHCP_HOSTNAME is defined (it will be set to 1 to say this field is enable). I propose netif, because I think that snmp_set_sysname can/have to use it. Perhaps LWIP_HOSTNAME will be a better name? ==================================== Frédéric BERNON HYMATOM SA Chef de projet informatique Microsoft Certified Professional Tél. : +33 (0)4-67-87-61-10 Fax. : +33 (0)4-67-70-85-44 Email : [EMAIL PROTECTED] Web Site : http://www.hymatom.fr ==================================== P Avant d'imprimer, penser à l'environnement -----Message d'origine----- De : [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] De la part de Joolz [RSD] Envoyé : vendredi 23 mars 2007 14:45 À : Mailing list for lwIP users Objet : [lwip-users] DHCP Modifications This adds in a system of allowing the user to set the HOSTNAME for DHCP Add into you options #define LWIP_DHCP_HOSTNAME "IP500" #define LWIP_DHCP_HOSTNAME_LENGTH 5 If you do not need this then set LWIP_DHCP_HOSTNAME_LENGTH to 0 or just leave it out. Best Regards Julian Gardner Director / Software Development Manager RSD Communications Ltd Unit 2, 8 Borrowmeadow Road Stirling Scotland FK7 7UW Tel +44 [0]1786 450572 Ext 238 Fax +44 [0]1786 450572 Mob +44 [0]7836 240907 WWW http://www.rsdtv.com EMAIL [EMAIL PROTECTED] ========================================== Please do not send me any email messages in HTML format or it may be deleted at our mail server without notice to sender or recipient. Message contents should be considered as confidential regardless of the contents. _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
