Print this page
7388 Support DHCP Client FQDN. Allow IAID/DUID for all v4.

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/cmd-inet/sbin/dhcpagent/packet.h
          +++ new/usr/src/cmd/cmd-inet/sbin/dhcpagent/packet.h
↓ open down ↓ 13 lines elided ↑ open up ↑
  14   14   * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
  15   15   * If applicable, add the following below this CDDL HEADER, with the
  16   16   * fields enclosed by brackets "[]" replaced with your own identifying
  17   17   * information: Portions Copyright [yyyy] [name of copyright owner]
  18   18   *
  19   19   * CDDL HEADER END
  20   20   */
  21   21  /*
  22   22   * Copyright 2007 Sun Microsystems, Inc.  All rights reserved.
  23   23   * Use is subject to license terms.
       24 + * Copyright (c) 2016, Chris Fraire <cfraire@me.com>.
  24   25   */
  25   26  
  26   27  #ifndef _PACKET_H
  27   28  #define _PACKET_H
  28   29  
  29   30  #pragma ident   "%Z%%M% %I%     %E% SMI"
  30   31  
  31   32  #include <sys/types.h>
  32   33  #include <netinet/in.h>
  33   34  #include <netinet/dhcp.h>
↓ open down ↓ 81 lines elided ↑ open up ↑
 115  116  
 116  117  PKT_LIST        *alloc_pkt_entry(size_t, boolean_t);
 117  118  void            free_pkt_entry(PKT_LIST *);
 118  119  void            free_pkt_list(PKT_LIST **);
 119  120  uchar_t         pkt_recv_type(const PKT_LIST *);
 120  121  uint_t          pkt_get_xid(const PKT *, boolean_t);
 121  122  dhcp_pkt_t      *init_pkt(dhcp_smach_t *, uchar_t);
 122  123  boolean_t       remove_pkt_opt(dhcp_pkt_t *, uint_t);
 123  124  boolean_t       update_v6opt_len(dhcpv6_option_t *, int);
 124  125  void            *add_pkt_opt(dhcp_pkt_t *, uint_t, const void *, uint_t);
      126 +size_t          encode_dhcp_opt(void *, boolean_t, uint_t, const void *,
      127 +                        uint_t);
 125  128  void            *add_pkt_subopt(dhcp_pkt_t *, dhcpv6_option_t *, uint_t,
 126  129                      const void *, uint_t);
 127  130  void            *add_pkt_opt16(dhcp_pkt_t *, uint_t, uint16_t);
 128  131  void            *add_pkt_opt32(dhcp_pkt_t *, uint_t, uint32_t);
 129  132  void            *add_pkt_prl(dhcp_pkt_t *, dhcp_smach_t *);
 130  133  boolean_t       add_pkt_lif(dhcp_pkt_t *, dhcp_lif_t *, int, const char *);
 131  134  void            stop_pkt_retransmission(dhcp_smach_t *);
 132  135  void            retransmit_now(dhcp_smach_t *);
 133  136  PKT_LIST        *recv_pkt(int, int, boolean_t);
 134  137  boolean_t       pkt_v4_match(uchar_t, dhcp_message_type_t);
↓ open down ↓ 12 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX