#include "iwpm_util.h"
#define IWPM_MAPINFO_HASH_SIZE …
#define IWPM_MAPINFO_HASH_MASK …
#define IWPM_REMINFO_HASH_SIZE …
#define IWPM_REMINFO_HASH_MASK …
#define IWPM_MSG_SIZE …
static LIST_HEAD(iwpm_nlmsg_req_list);
static DEFINE_SPINLOCK(iwpm_nlmsg_req_lock);
static struct hlist_head *iwpm_hash_bucket;
static DEFINE_SPINLOCK(iwpm_mapinfo_lock);
static struct hlist_head *iwpm_reminfo_bucket;
static DEFINE_SPINLOCK(iwpm_reminfo_lock);
static struct iwpm_admin_data iwpm_admin;
int iwpm_init(u8 nl_client)
{ … }
static void free_hash_bucket(void);
static void free_reminfo_bucket(void);
int iwpm_exit(u8 nl_client)
{ … }
static struct hlist_head *get_mapinfo_hash_bucket(struct sockaddr_storage *,
struct sockaddr_storage *);
int iwpm_create_mapinfo(struct sockaddr_storage *local_sockaddr,
struct sockaddr_storage *mapped_sockaddr,
u8 nl_client, u32 map_flags)
{ … }
int iwpm_remove_mapinfo(struct sockaddr_storage *local_sockaddr,
struct sockaddr_storage *mapped_local_addr)
{ … }
static void free_hash_bucket(void)
{ … }
static void free_reminfo_bucket(void)
{ … }
static struct hlist_head *get_reminfo_hash_bucket(struct sockaddr_storage *,
struct sockaddr_storage *);
void iwpm_add_remote_info(struct iwpm_remote_info *rem_info)
{ … }
int iwpm_get_remote_info(struct sockaddr_storage *mapped_loc_addr,
struct sockaddr_storage *mapped_rem_addr,
struct sockaddr_storage *remote_addr,
u8 nl_client)
{ … }
struct iwpm_nlmsg_request *iwpm_get_nlmsg_request(__u32 nlmsg_seq,
u8 nl_client, gfp_t gfp)
{ … }
void iwpm_free_nlmsg_request(struct kref *kref)
{ … }
struct iwpm_nlmsg_request *iwpm_find_nlmsg_request(__u32 echo_seq)
{ … }
int iwpm_wait_complete_req(struct iwpm_nlmsg_request *nlmsg_request)
{ … }
int iwpm_get_nlmsg_seq(void)
{ … }
u32 iwpm_get_registration(u8 nl_client)
{ … }
void iwpm_set_registration(u8 nl_client, u32 reg)
{ … }
u32 iwpm_check_registration(u8 nl_client, u32 reg)
{ … }
int iwpm_compare_sockaddr(struct sockaddr_storage *a_sockaddr,
struct sockaddr_storage *b_sockaddr)
{ … }
struct sk_buff *iwpm_create_nlmsg(u32 nl_op, struct nlmsghdr **nlh,
int nl_client)
{ … }
int iwpm_parse_nlmsg(struct netlink_callback *cb, int policy_max,
const struct nla_policy *nlmsg_policy,
struct nlattr *nltb[], const char *msg_type)
{ … }
void iwpm_print_sockaddr(struct sockaddr_storage *sockaddr, char *msg)
{ … }
static u32 iwpm_ipv6_jhash(struct sockaddr_in6 *ipv6_sockaddr)
{ … }
static u32 iwpm_ipv4_jhash(struct sockaddr_in *ipv4_sockaddr)
{ … }
static int get_hash_bucket(struct sockaddr_storage *a_sockaddr,
struct sockaddr_storage *b_sockaddr, u32 *hash)
{ … }
static struct hlist_head *get_mapinfo_hash_bucket(struct sockaddr_storage
*local_sockaddr, struct sockaddr_storage
*mapped_sockaddr)
{ … }
static struct hlist_head *get_reminfo_hash_bucket(struct sockaddr_storage
*mapped_loc_sockaddr, struct sockaddr_storage
*mapped_rem_sockaddr)
{ … }
static int send_mapinfo_num(u32 mapping_num, u8 nl_client, int iwpm_pid)
{ … }
static int send_nlmsg_done(struct sk_buff *skb, u8 nl_client, int iwpm_pid)
{ … }
int iwpm_send_mapinfo(u8 nl_client, int iwpm_pid)
{ … }
int iwpm_mapinfo_available(void)
{ … }
int iwpm_send_hello(u8 nl_client, int iwpm_pid, u16 abi_version)
{ … }