Files
m241Neelima/components/ip_net2-6.9/ipdhcps6/src/ipdhcps6_authhash.h
T
2026-07-30 11:19:44 +05:30

121 lines
3.4 KiB
C

/*
******************************************************************************
* INTERPEAK API HEADER FILE
*
* Copyright 2007 Wind River Systems
******************************************************************************
*/
/*
modification history
--------------------
01a,17jul07,ps initial checkin of dhcpv6 authentication key database module
*/
#ifndef IPDHCPS6_AUTHHASH_H
#define IPDHCPS6_AUTHHASH_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
#include "ipdhcps6_config.h"
#include "ipdhcps6_duid.h"
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#include <ipcom_hash.h>
#ifdef __cplusplus
extern "C" {
#endif
struct Ipdhcps6_authkey_secret
{
int len;
Ip_u8 *key;
};
typedef struct Ipdhcps6_authkey_secret Ipdhcps6_authkey_secret;
struct Ipdhcps6_authkey_duid
{
int len;
Ip_u8 *duid;
};
typedef struct Ipdhcps6_authkey_duid Ipdhcps6_authkey_duid;
struct Ipdhcps6_authkey_dbentry
{
Ipdhcps6_duid duid;
Ipdhcps6_authkey_secret secret;
};
typedef struct Ipdhcps6_authkey_dbentry Ipdhcps6_authkey_dbentry;
struct Ipdhcps6_authtrans_dbentry
{
Ipdhcps6_duid duid;
Ip_u16 flags;
Ip_u32 client_replay1;
Ip_u32 client_replay2;
Ip_u32 server_replay1;
Ip_u32 server_replay2;
};
typedef struct Ipdhcps6_authtrans_dbentry Ipdhcps6_authtrans_dbentry;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
IP_GLOBAL Ipdhcps6_duid *ipdhcps6_authdb_create_ll_duid (int len, Ip_u16 hwtype, Ip_u8 *link_addr);
IP_GLOBAL Ip_err ipdhcps6_client_wants_auth (union Ipdhcps6_duid_data *client, int len);
IP_GLOBAL Ip_err ipdhcps6_client_no_auth (union Ipdhcps6_duid_data *client, int len);
IP_GLOBAL Ipdhcps6_authtrans_dbentry
*ipdhcps6_client_requested_auth (union Ipdhcps6_duid_data *client, int len);
IP_GLOBAL Ip_err ipdhcps6_get_auth_realm (Ip_size_t *len, Ip_u8 **realm);
IP_GLOBAL Ip_err ipdhcps6_get_default_auth_key (Ip_size_t *len, Ip_u8 **key);
IP_GLOBAL Ip_err ipdhcps6_find_key_for_client (union Ipdhcps6_duid_data *client,
int duid_len,
Ip_u8 **key, Ip_size_t *key_len);
IP_GLOBAL Ipcom_hash *ipdhcps6_authdb_hash_create(void);
IP_GLOBAL Ipcom_hash *ipdhcps6_authtrans_hash_create(void);
IP_GLOBAL Ip_err ipdhcps6_add_client_authkey (Ipdhcps6_duid *client_duid,Ip_u8 *key, int keylen);
IP_GLOBAL Ip_err ipdhcps6_set_default_auth_key (char *authkey);
IP_GLOBAL Ip_err ipdhcps6_set_auth_realm (char *auth_realm);
IP_GLOBAL void ipdhcps6_authdb_init (void);
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/
#endif