/* ****************************************************************************** * INTERPEAK API HEADER FILE * * Document no: @(#) $Name: VXWORKS_ITER40_2019102207 $ $RCSfile: ipdhcps6_host.h,v $ $Revision: 1.7.18.1 $ * $Source: /home/interpeak/CVSRoot/ipdhcps6/src/ipdhcps6_host.h,v $ * $Author: ulf $ $Date: 2011-11-16 10:33:28 $ * $State: Exp $ $Locker: $ * * INTERPEAK_COPYRIGHT_STRING * Design and implementation by Kenneth Jonsson ****************************************************************************** */ #ifndef IPDHCPS6_HOST_H #define IPDHCPS6_HOST_H /* **************************************************************************** * 1 DESCRIPTION **************************************************************************** */ /* **************************************************************************** * 2 CONFIGURATION **************************************************************************** */ #include "ipdhcps6_config.h" /* **************************************************************************** * 3 INCLUDE FILES **************************************************************************** */ #include #include #include #ifdef __cplusplus extern "C" { #endif /* **************************************************************************** * 4 DEFINES **************************************************************************** */ /* **************************************************************************** * 5 TYPES **************************************************************************** */ struct Ipdhcps6_active_lease_addr_struct; typedef struct Ipdhcps6_fqdn { char fullName[255]; Ip_bool ptr_status; /*Ptr update successfully or not*/ Ip_bool aaaa_status; /*AAAA update successfully or not*/ Ip_bool agent; Ip_bool oro; struct Ip_in6_addr addr; } Ipdhcps6_fqdn; /* DHCP host structure */ typedef struct Ipdhcps6_host_struct { /* The client ID for this host */ Ipdhcps6_option *duid; /* The currently leased by a client with this host */ Ipcom_list leases_head; /* The interface used to communicate with this host */ int ifindex; /* The unicast address for this host */ struct Ip_sockaddr_in6 addr; /* Last time this host contacted the DHCP server */ Ip_time_t last_servered; /* Is IP_TRUE if a Server Unicast Option has been sent to this host */ Ip_bool is_allowed_to_use_unicast; /* Options for this host */ Ipcom_hash *options; /* User associated with this host, ipcom_strlen(user.name) != 0 only if the user is known */ Ipdhcps6_user user; Ipdhcps6_fqdn fqdn; } Ipdhcps6_host; /* **************************************************************************** * 6 FUNCTIONS **************************************************************************** */ IP_GLOBAL Ipdhcps6_host * ipdhcps6_host_new(Ipdhcps6_option *duid, struct Ip_sockaddr_in6 *addr); IP_GLOBAL Ipdhcps6_host * ipdhcps6_host_get(Ipdhcps6_option *duid); IP_GLOBAL Ipcom_hash * ipdhcps6_host_new_db(void); IP_GLOBAL void ipdhcps6_host_delete_db(Ipcom_hash *hosts); IP_GLOBAL Ip_bool ipdhcps6_host_has_prefix(const Ipdhcps6_host *host); IP_GLOBAL void ipdhcps6_host_try_get_user(Ipdhcps6_host *host, Ipcom_netif *netif); #ifdef __cplusplus } #endif #endif /* **************************************************************************** * END OF FILE **************************************************************************** */