Systemd/src/libsystemd-network
Susant Sahani 3392392518 sd-network: DHCPv6 - add support to send userclass option
sd-network: DHCPv6 - add support to send userclass option

21.15.  User Class Option

   The User Class option is used by a client to identify the type or
   category of users or applications it represents.

   The format of the User Class option is:

       0                   1                   2                   3
       0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      |       OPTION_USER_CLASS       |          option-len           |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
      .                                                               .
      .                          user-class-data                      .
      .                                                               .
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Figure 26: User Class Option Format

      option-code          OPTION_USER_CLASS (15).

      option-len           Length of user-class-data field.

      user-class-data      The user classes carried by the client.  The
                           length, in octets, is specified by
                           option-len.

The information contained in the data area of this option is
   contained in one or more opaque fields that represent the user class
   or classes of which the client is a member.  A server selects
   configuration information for the client based on the classes
   identified in this option.  For example, the User Class option can be
   used to configure all clients of people in the accounting department
   with a different printer than clients of people in the marketing
   department.  The user class information carried in this option MUST
   be configurable on the client.

   The data area of the User Class option MUST contain one or more
   instances of user-class-data information.  Each instance of
   user-class-data is formatted as follows:

      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...-+-+-+-+-+-+-+
      |        user-class-len         |          opaque-data          |
      +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-...-+-+-+-+-+-+-+

                Figure 27: Format of user-class-data Field
2020-05-19 11:44:51 +02:00
..
arp-util.c tree-wide: drop netinet/ether.h from socket-util.h and sd-netlink.h 2019-07-24 18:23:08 +09:00
arp-util.h arp-util: use net/ethernet.h instead of netinet/if_ether.h 2019-04-13 17:51:59 +09:00
dhcp-client-internal.h network: DHCPv4 client: add support to send arbitary option and data 2019-10-15 00:14:02 +09:00
dhcp-identifier.c libsystemd-network: rename net_get_name() to net_get_name_persistent() 2019-06-17 13:43:18 +02:00
dhcp-identifier.h dhcp6: don't enforce DUID content for sd_dhcp6_client_set_duid() 2018-12-20 13:40:39 +01:00
dhcp-internal.h dhcp: remove struct sd_dhcp_raw_option 2019-11-18 23:37:22 +09:00
dhcp-lease-internal.h sd-network: DHCPv4 Add support to send and receive LPR servers. 2020-04-22 14:48:11 +02:00
dhcp-network.c tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
dhcp-option.c dhcp: remove struct sd_dhcp_raw_option 2019-11-18 23:37:22 +09:00
dhcp-packet.c dhcp4: make IPServiceType configurable 2019-09-26 11:39:46 +09:00
dhcp-protocol.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
dhcp-server-internal.h sd-dhcp-server: some function prototype fix-ups 2020-05-14 17:11:44 +02:00
dhcp6-internal.h sd-network: DHCPv6 - add support to send userclass option 2020-05-19 11:44:51 +02:00
dhcp6-lease-internal.h dhcp6-client: Store lease timeouts T1 and T1 in client struct 2018-09-19 13:45:18 -06:00
dhcp6-network.c tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
dhcp6-option.c sd-network: DHCPv6 - add support to send userclass option 2020-05-19 11:44:51 +02:00
dhcp6-protocol.h sd-network: DHCPv6 - Add status codes 2020-04-13 17:40:00 +02:00
icmp6-util.c tree-wide: make sure our control buffers are properly aligned 2020-05-07 14:39:44 +02:00
icmp6-util.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
lldp-internal.h tree-wide: use PROJECT_FILE instead of __FILE__ 2019-07-04 10:36:00 +02:00
lldp-neighbor.c sd-lldp: Add support to receive MUD 2020-04-07 17:17:29 +02:00
lldp-neighbor.h sd-lldp: Add support to receive MUD 2020-04-07 17:17:29 +02:00
lldp-network.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
lldp-network.h tree-wide: drop double newline 2018-06-29 11:02:17 +09:00
meson.build network: DHCPv4 client: add support to send arbitary option and data 2019-10-15 00:14:02 +09:00
ndisc-internal.h tree-wide: use PROJECT_FILE instead of __FILE__ 2019-07-04 10:36:00 +02:00
ndisc-router.c tree-wide: drop missing.h 2019-10-31 17:57:03 +09:00
ndisc-router.h tree-wide: use proper unicode © instead of (C) where we can 2018-06-14 10:20:20 +02:00
network-internal.c network: make Type=ether match based on iftype 2020-03-02 08:52:18 +01:00
network-internal.h network: move NETWORK_DIRS to path-lookup.h 2020-03-27 20:12:45 +01:00
radv-internal.h network: Add support to advertie ipv6 route 2019-09-17 12:09:59 +02:00
sd-dhcp-client.c tree-wide: make sure our control buffers are properly aligned 2020-05-07 14:39:44 +02:00
sd-dhcp-lease.c Merge pull request #15472 from keszybz/dbus-api-docs 2020-04-23 17:01:11 +02:00
sd-dhcp-server.c sd-dhcp-server: some function prototype fix-ups 2020-05-14 17:11:44 +02:00
sd-dhcp6-client.c sd-network: DHCPv6 - add support to send userclass option 2020-05-19 11:44:51 +02:00
sd-dhcp6-lease.c dhcp: replace strerror() with %m 2019-07-05 02:43:56 +09:00
sd-ipv4acd.c ipv4ll: do not reset conflict counter on restart 2019-12-11 13:26:31 +09:00
sd-ipv4ll.c ipv4ll: do not reset conflict counter on restart 2019-12-11 13:26:31 +09:00
sd-lldp.c util: split out sorting related calls to new sort-util.[ch] 2019-03-13 12:16:43 +01:00
sd-ndisc.c ndisc: make first solicit delayed randomly 2019-09-16 05:37:04 +09:00
sd-radv.c network: 'cur' variable cannot be null, so simplify code 2020-05-13 22:56:42 +02:00
test-acd.c ipv4ll: do not reset conflict counter on restart 2019-12-11 13:26:31 +09:00
test-dhcp-client.c dhcp4: make IPServiceType configurable 2019-09-26 11:39:46 +09:00
test-dhcp-option.c util: split out memcmp()/memset() related calls into memory-util.[ch] 2019-03-13 12:16:43 +01:00
test-dhcp-server.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-dhcp6-client.c dhcpv6 tests: Update since we allow arbitrary options to be set 2020-05-17 11:18:46 +02:00
test-ipv4ll-manual.c tests: use a helper function to parse environment and open logging 2018-09-14 09:29:57 +02:00
test-ipv4ll.c tree-wide: drop socket.h when socket-util.h is included 2019-11-04 00:30:32 +09:00
test-lldp.c tree-wide: drop string.h when string-util.h or friends are included 2019-11-04 00:30:32 +09:00
test-ndisc-ra.c codespell: fix spelling errors 2019-04-29 16:47:18 +02:00
test-ndisc-rs.c headers: remove unneeded includes from util.h 2019-03-27 11:53:12 +01:00
test-sd-dhcp-lease.c test: Add return 0 to main() function (even it is not strictly necessary) 2020-05-13 22:56:42 +02:00