original files of m241
This commit is contained in:
@@ -0,0 +1,137 @@
|
||||
/*
|
||||
******************************************************************************
|
||||
* INTERPEAK API HEADER FILE
|
||||
******************************************************************************
|
||||
*/
|
||||
#ifndef IPDHCPC6_DUID_H
|
||||
#define IPDHCPC6_DUID_H
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 1 DESCRIPTION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 2 CONFIGURATION
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 3 INCLUDE FILES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
#include <ipcom_type.h>
|
||||
#include <ipcom_cstyle.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 4 DEFINES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/* Link-layer address plus time */
|
||||
#define IPDHCPC6_DUID_LLT 1
|
||||
/* Vendor-assigned unique ID based on Enterprise Number */
|
||||
#define IPDHCPC6_DUID_EN 2
|
||||
/* Link-layer address */
|
||||
#define IPDHCPC6_DUID_LL 3
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 5 TYPES
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
/* Generic format for DHCP Unique IDentification */
|
||||
struct Ipdhcpc6_duid_generic
|
||||
{
|
||||
/* The type of DUID this is */
|
||||
Ip_u16 content;
|
||||
Ip_u8 data[1];
|
||||
};
|
||||
|
||||
|
||||
/* DUID Based on Link-layer Address Plus Time */
|
||||
struct Ipdhcpc6_duid_llt_data
|
||||
{
|
||||
/* Content is always IPDHCPC6_DUID_LLT for this type */
|
||||
Ip_u16 content;
|
||||
/* Link layer hardware type */
|
||||
Ip_u16 hardware_type;
|
||||
/* Time when this DUID was created */
|
||||
Ip_u32 time;
|
||||
/* Link layer address from one of the interfaces (variable length) */
|
||||
Ip_u8 link_addr[6];
|
||||
};
|
||||
|
||||
|
||||
/* DUID Assigned by Vendor Based on Enterprise Number */
|
||||
struct Ipdhcpc6_duid_en_data
|
||||
{
|
||||
/* Content is always IPDHCPC6_DUID_EN for this type */
|
||||
Ip_u16 content;
|
||||
/* Vendor's registered Private Enterprise Number as maintained by IANA */
|
||||
Ip_u16 enterprise_number_1;
|
||||
Ip_u16 enterprise_number_2;
|
||||
/* Vendor specified ID (variable length) */
|
||||
Ip_u8 id[1];
|
||||
};
|
||||
|
||||
|
||||
/* DUID Based on Link-layer Address */
|
||||
struct Ipdhcpc6_duid_ll_data
|
||||
{
|
||||
/* Content is always IPDHCPC6_DUID_LL for this type */
|
||||
Ip_u16 content;
|
||||
/* Link layer hardware type */
|
||||
Ip_u16 hardware_type;
|
||||
/* Link layer address from one of the interfaces (variable length) */
|
||||
Ip_u8 link_addr[6];
|
||||
};
|
||||
|
||||
|
||||
union Ipdhcpc6_duid_data
|
||||
{
|
||||
struct Ipdhcpc6_duid_generic generic;
|
||||
struct Ipdhcpc6_duid_llt_data llt;
|
||||
struct Ipdhcpc6_duid_en_data en;
|
||||
struct Ipdhcpc6_duid_ll_data ll;
|
||||
};
|
||||
|
||||
|
||||
typedef struct Ipdhcpc6_duid_struct
|
||||
{
|
||||
/* The length of DUID data */
|
||||
Ip_u16 len;
|
||||
union Ipdhcpc6_duid_data data;
|
||||
}
|
||||
Ipdhcpc6_duid;
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* 6 FUNCTIONS
|
||||
****************************************************************************
|
||||
*/
|
||||
|
||||
IP_GLOBAL Ip_err ipdhcpc6_duid_initialize(void);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
****************************************************************************
|
||||
* END OF FILE
|
||||
****************************************************************************
|
||||
*/
|
||||
Reference in New Issue
Block a user