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

123 lines
3.4 KiB
C

/*
******************************************************************************
* INTERPEAK API HEADER FILE
*
* Document no: @(#) $Name: VXWORKS_ITER40_RCPL8_2024030303 $ $RCSfile: ipdhcps6_subnet.h,v $ $Revision: 1.4.36.1 $
* $Source: /home/interpeak/CVSRoot/ipdhcps6/src/ipdhcps6_subnet.h,v $
* $Author: jchang1 $ $Date: 2022-09-22 09:39:18 $
* $State: Exp $ $Locker: $
*
* Copyright Interpeak AB 2000-2002 <www.interpeak.se>. All rights reserved.
* Design and implementation by Kenneth Jonsson <kenneth@interpeak.se>
******************************************************************************
*/
#ifndef IPDHCPS6_SUBNET_H
#define IPDHCPS6_SUBNET_H
/*
****************************************************************************
* 1 DESCRIPTION
****************************************************************************
*/
/*
****************************************************************************
* 2 CONFIGURATION
****************************************************************************
*/
#include "ipdhcps6_config.h"
/*
****************************************************************************
* 3 INCLUDE FILES
****************************************************************************
*/
#include <ipcom_type.h>
#include <ipcom_cstyle.h>
#include "ipdhcps6_msg.h"
#include "ipdhcps6_subnet.h"
#include "ipdhcps6_prefix.h"
#ifdef __cplusplus
extern "C" {
#endif
/*
****************************************************************************
* 4 DEFINES
****************************************************************************
*/
/*
****************************************************************************
* 5 TYPES
****************************************************************************
*/
typedef struct Ipdhcps6_subnet_key_struct
{
struct Ip_in6_addr addr;
int ifindex;
}
Ipdhcps6_subnet_key;
/* Subnet structure */
typedef struct Ipdhcps6_subnet_entry_struct
{
Ipcom_route_entry hdr;
/* The IPv6 subnet */
Ipdhcps6_subnet_key subnet;
/* Subnet mask */
Ipdhcps6_subnet_key mask;
/* Prefix length */
int prefix_len;
/* Options for this subnet */
Ipcom_hash *options;
/* Will be !=IP_NULL if an address pool has been assigned to this subnet */
Ipdhcps6_addr_pool *pools;
/* Hash table of leases that is currently assigned from the pools
The elements are of type Ipdhcps6_lease_addr */
Ipcom_hash *active_leases;
}
Ipdhcps6_subnet_entry;
/*
****************************************************************************
* 6 FUNCTIONS
****************************************************************************
*/
IP_GLOBAL Ipdhcps6_subnet_entry *
ipdhcps6_subnet_get_from_addr(struct Ip_in6_addr *addr, int ifindex);
IP_GLOBAL Ipdhcps6_subnet_entry *
ipdhcps6_subnet_get(struct Ip_in6_addr *subnet, int ifindex);
IP_GLOBAL Ipcom_route *
ipdhcps6_subnet_new_db(void);
IP_GLOBAL void
ipdhcps6_subnet_remove_subnets(void);
IP_GLOBAL void
ipdhcps6_subnet_delete_db(Ipcom_route *subnets);
#ifdef __cplusplus
}
#endif
#endif
/*
****************************************************************************
* END OF FILE
****************************************************************************
*/