]> git.ipfire.org Git - thirdparty/systemd.git/commit - src/network/networkd-network.c
networkd: add support to send DHCP user class option (#7499)
authorSusant Sahani <145210+ssahani@users.noreply.github.com>
Mon, 7 May 2018 12:21:02 +0000 (17:51 +0530)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Mon, 7 May 2018 12:21:02 +0000 (14:21 +0200)
commitaf1c0de0e124c22858fce99534d4de1f7ed340a7
tree1e52269cedc62d3293f1b127ee09e60d1bacb8e8
parent348b44372f36010d48d9a7dda14ef67155753a71
networkd: add support to send DHCP user class option (#7499)

This patch add support to enables to send User Class option code 77
RFC 3004.

This option MAY carry multiple User Classes.

The format of this option is as follows:

         Code   Len   Value
        +-----+-----+---------------------  . . .  --+
        | 77  |  N  | User Class Data ('Len' octets) |
        +-----+-----+---------------------  . . .  --+

   where Value consists of one or more instances of User Class Data.
   Each instance of User Class Data is formatted as follows:

         UC_Len_i     User_Class_Data_i
        +--------+------------------------  . . .  --+
        |  L_i   | Opaque-Data ('UC_Len_i' octets)   |
        +--------+------------------------  . . .  --+

UserClass=
A DHCPv4 client can use UserClass option to identify the type or category of user or applications
it represents. The information contained in this option is an string that represents the user class
of which the client is a member. Each class sets an identifying string of information to be used by the DHCP service to classify clients. Takes a whitespace-separated list.

UserClass= hello world how are you

Closes: RFC: #5134
man/systemd.network.xml
src/libsystemd-network/dhcp-option.c
src/libsystemd-network/sd-dhcp-client.c
src/network/networkd-dhcp4.c
src/network/networkd-network-gperf.gperf
src/network/networkd-network.c
src/network/networkd-network.h
src/systemd/sd-dhcp-client.h