Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/SoftEtherVPN/SoftEtherVPN_Stable.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiyuu Nobori <da.git@softether.co.jp>2016-11-27 11:55:04 +0300
committerGitHub <noreply@github.com>2016-11-27 11:55:04 +0300
commit5f8ce287c3f61d089b5122efd7be5b8fc997bbed (patch)
tree04022ff0197d72e56d0ade000b960a6eb5aa6735 /src/Mayaqua
parent697bff4023d778acfcf5de5266ccaaaf0c626573 (diff)
parent03ffd7535ac3ecb0b5985ab919ed3f50fa6aa7dd (diff)
Merge pull request #133 from yehorov/master
Add the possibility to send the Virtual Hub Name to an external DHCP server
Diffstat (limited to 'src/Mayaqua')
-rw-r--r--src/Mayaqua/TcpIp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/Mayaqua/TcpIp.h b/src/Mayaqua/TcpIp.h
index 995467c5..da75d21b 100644
--- a/src/Mayaqua/TcpIp.h
+++ b/src/Mayaqua/TcpIp.h
@@ -623,6 +623,7 @@ struct ICMPV6_HEADER_INFO
#define DHCP_ID_CLIENT_ID 0x3d
#define DHCP_ID_VENDOR_ID 0x3c
#define DHCP_ID_REQ_PARAM_LIST 0x37
+#define DHCP_ID_USER_CLASS 0x4d
#define DHCP_ID_CLASSLESS_ROUTE 0x79
#define DHCP_ID_MS_CLASSLESS_ROUTE 0xF9
#define DHCP_ID_PRIVATE 0xFA
@@ -794,6 +795,8 @@ struct DHCP_CLASSLESS_ROUTE_TABLE
DHCP_CLASSLESS_ROUTE Entries[MAX_DHCP_CLASSLESS_ROUTE_ENTRIES]; // Entries
};
+#define MAX_USER_CLASS_LEN 255
+
// DHCP option list
struct DHCP_OPTION_LIST
{
@@ -803,6 +806,10 @@ struct DHCP_OPTION_LIST
// Client request
UINT RequestedIp; // Requested IP address
char Hostname[MAX_HOST_NAME_LEN + 1]; // Host name
+ char UserClass[MAX_USER_CLASS_LEN + 1]; // User class
+ // RFC3003 defines that User Class option is array of text strings,
+ // but the most popular DHCP clients and servers,
+ // i.e. ISC DHCP and Microsoft DHCP Server, consider it a text string
// Server response
UINT ClientAddress; // Client address