/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _INET_ILB_IMPL_H
#define _INET_ILB_IMPL_H
#include <sys/netstack.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Statistics in ILB is stored in several kstat structures. ilb_g_kstat
* represents the global statistics. ilb_rule_kstat represents the statistics
* of a rule. ilb_server_kstat represents the statistics of a server.
*/
typedef struct ilb_g_kstat_s {
{ \
(ilbs)); \
}
typedef struct ilb_rule_kstat {
{ \
(rule)); \
}
{ \
(rule)); \
}
typedef struct ilb_server_kstat {
{ \
(host)); \
}
{ \
(host)); \
}
/* The maximum port range, meaning all ports (65535 - 1). */
struct ilb_nat_src_s;
/*
* This structure reprensents a server.
*/
typedef struct ilb_server_s {
} ilb_server_t;
{ \
(host)->iser_refcnt++; \
}
{ \
(host)->iser_refcnt--; \
}
struct ilb_rule_s;
struct ilb_hash_s;
typedef struct ilb_alg_data_s {
in_port_t, void *, ilb_server_t **);
void *ilb_alg_data;
/*
* A load balance rule has
*
* 1. a name
* 2. a network protocol
* 3. a transport protocol
* 4. a load balance mechanism (DSR, NAT, ...)
* 5. a target address (VIP)
* 6. a target port (or port ranges)
* 7. a pool of back end servers
* 8. a load balance algorithm (round robin, hashing, ...)
*/
typedef struct ilb_rule_s {
} ilb_rule_t;
{ \
}
{ \
}
typedef struct ilb_hash_s {
#else
#endif
} ilb_hash_t;
struct ilb_nat_src_entry_s;
/*
* Structure to store NAT info.
*
* Half NAT only uses the first 4 fields in the structure.
*/
typedef struct {
extern int ilb_kmem_flags;
#ifdef __cplusplus
}
#endif
#endif /* _INET_ILB_IMPL_H */