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

120 lines
3.4 KiB
C

/*******************************************************************************
* INTERPEAK API HEADER FILE
*
* Copyright 2007 Wind River Systems
******************************************************************************
*/
#ifndef IPDHCPC6_AUTHHASH_H
#define IPDHCPC6_AUTHHASH_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
#if 0
#include "ipdhcps6_config.h"
#endif
#include "ipdhcpc6_duid.h"
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#ifdef __cplusplus
extern "C" {
#endif
struct Ipdhcpc6_authkey_secret
{
int len;
Ip_u8 *key;
};
typedef struct Ipdhcpc6_authkey_secret Ipdhcpc6_authkey_secret;
struct Ipdhcpc6_authkey_duid
{
int len;
Ip_u8 *duid;
};
typedef struct Ipdhcpc6_authkey_duid Ipdhcpc6_authkey_duid;
struct Ipdhcpc6_authkey_dbentry
{
Ipdhcpc6_duid duid;
Ipdhcpc6_authkey_secret secret;
};
typedef struct Ipdhcpc6_authkey_dbentry Ipdhcpc6_authkey_dbentry;
struct Ipdhcpc6_authtrans_dbentry
{
Ipdhcpc6_duid duid;
Ip_u16 flags; /* not currently used */
/* Replay Counters */
Ip_u32 client_replay1;
Ip_u32 client_replay2;
Ip_u32 server_replay1;
Ip_u32 server_replay2;
};
typedef struct Ipdhcpc6_authtrans_dbentry Ipdhcpc6_authtrans_dbentry;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
IP_GLOBAL Ipcom_hash *ipdhcpc6_authdb_hash_create(void);
IP_GLOBAL Ipcom_hash *ipdhcpc6_authtrans_hash_create(void);
IP_GLOBAL void ipdhcpc6_block_on_user_authdb_config (void);
IP_GLOBAL void ipdhcpc6_user_authdb_config_finished (void);
IP_GLOBAL Ipdhcpc6_duid *ipdhcpc6_authdb_create_ll_duid (int len, Ip_u16 hwtype, Ip_u8 *link_addr);
IP_GLOBAL Ip_err ipdhcpc6_add_server_authkey (Ipdhcpc6_duid *server_duid,
Ip_u8 *key, int keylen);
IP_GLOBAL Ipdhcpc6_authtrans_dbentry *
ipdhcpc6_create_server_authtrans_entry (union Ipdhcpc6_duid_data *client, int len);
IP_GLOBAL Ip_err ipdhcpc6_server_no_auth (Ipdhcpc6_duid *server);
IP_GLOBAL Ipdhcpc6_authtrans_dbentry
*ipdhcpc6_get_server_authtrans_entry (union Ipdhcpc6_duid_data *client, int len);
IP_GLOBAL Ip_err ipdhcpc6_get_auth_realm (int *len, Ip_u8 **realm);
IP_GLOBAL Ip_err ipdhcpc6_get_default_auth_key (int *len, Ip_u8 **key);
IP_GLOBAL Ip_err ipdhcpc6_set_default_auth_key (int len, Ip_u8 *key);
IP_GLOBAL Ip_err ipdhcpc6_find_key_for_server (union Ipdhcpc6_duid_data *server,
int duid_len,
Ip_u8 **key, int *key_len);
IP_GLOBAL void ipdhcpc6_authdb_init (void);
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/
#endif