mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-17 21:56:45 +08:00
opt.h, netif.h, dhcp.h, dhcp.c: New configuration option LWIP_NETIF_HOSTNAME allow to define a hostname in netif struct (this is just a pointer, so, you can use a hardcoded string, point on one of your's ethernetif field, or alloc a string you will free yourself). It will be used by DHCP to register a client hostname, but can also be use when you call snmp_set_sysname.
This commit is contained in:
@@ -210,6 +210,7 @@ void dhcp_fine_tmr(void);
|
||||
|
||||
#define DHCP_OPTION_T1 58 /* T1 renewal time */
|
||||
#define DHCP_OPTION_T2 59 /* T2 rebinding time */
|
||||
#define DHCP_OPTION_US 60
|
||||
#define DHCP_OPTION_CLIENT_ID 61
|
||||
#define DHCP_OPTION_TFTP_SERVERNAME 66
|
||||
#define DHCP_OPTION_BOOTFILE 67
|
||||
|
||||
@@ -104,6 +104,10 @@ struct netif {
|
||||
/** the DHCP client state information for this netif */
|
||||
struct dhcp *dhcp;
|
||||
#endif /* LWIP_DHCP */
|
||||
#if LWIP_NETIF_HOSTNAME
|
||||
/* the hostname for this netif, NULL is a valid value */
|
||||
char* hostname;
|
||||
#endif /* LWIP_NETIF_HOSTNAME */
|
||||
/** number of bytes used in hwaddr */
|
||||
u8_t hwaddr_len;
|
||||
/** link level hardware address of this interface */
|
||||
|
||||
@@ -383,6 +383,13 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#define TCP_SNDLOWAT TCP_SND_BUF/2
|
||||
#endif
|
||||
|
||||
|
||||
/* ---- Network Interfaces options ---- */
|
||||
/* 1 if you want to use DHCP_OPTION_HOSTNAME with netif's hostname field */
|
||||
#ifndef LWIP_NETIF_HOSTNAME
|
||||
#define LWIP_NETIF_HOSTNAME 0
|
||||
#endif
|
||||
|
||||
/* Support network interface callbacks */
|
||||
#ifndef LWIP_NETIF_CALLBACK
|
||||
#define LWIP_NETIF_CALLBACK 0
|
||||
@@ -401,6 +408,8 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#define LWIP_CALLBACK_API 0
|
||||
#endif
|
||||
|
||||
|
||||
/* ---------- Thread options ---------- */
|
||||
#ifndef TCPIP_THREAD_PRIO
|
||||
#define TCPIP_THREAD_PRIO 1
|
||||
#endif
|
||||
@@ -418,7 +427,7 @@ a lot of data that needs to be copied, this should be set high. */
|
||||
#endif
|
||||
|
||||
|
||||
/* ---------- Socket Options ---------- */
|
||||
/* ---------- Socket options ---------- */
|
||||
/* Enable BSD-style sockets functions names */
|
||||
#ifndef LWIP_COMPAT_SOCKETS
|
||||
#define LWIP_COMPAT_SOCKETS 1
|
||||
|
||||
Reference in New Issue
Block a user