⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ha_config.h

📁 mobile ip 在linux下的一种实现
💻 H
字号:
/* $Id: ha_config.h,v 1.19 2001/09/23 14:19:30 jm Exp $ * Home Agent - configuration reading routines * * Dynamic hierarchial IP tunnel * Copyright (C) 1998-2001, Dynamics group * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. See README and COPYING for * more details. */#ifndef HA_CONFIG_H#define HA_CONFIG_H#include <net/if.h>#include <netinet/in.h>#include <sys/time.h>#include "list.h"#include "message.h"#define MAXFILENAMELEN                      256#define MAXSHAREDSECRETLEN                  32#define MAXOWNERNAMELEN                     8#define MAXGROUPNAMELEN                     8#define HA_DEFAULT_MAX_BINDINGS             20#define HA_DEFAULT_TUNNEL_LIFETIME          500#define HA_DEFAULT_REG_ERROR_REPLY_INTERVAL 10#define HA_DEFAULT_SYSLOG_FACILITY          LOG_LOCAL0/* default port to listen for registration requests */#define HA_DEFAULT_REG_PORT                 434#define HA_MOBILE_HASHTABLE_SIZE            256#define MAXMSG 2048#define HASH_METHOD_NONE 0#define HASH_METHOD_CHECK 1#define HASH_METHOD_REQUIRE 2enum {	INTERFACE_AGENTADV_ONLY_SOLICITED = 0,	INTERFACE_AGENTADV_ALL = 1,	INTERFACE_AGENTADV_NONE = -1 };struct interface_entry {	struct node node;	/* data from dynhad.conf */	char dev[IFNAMSIZ + 1];	int ha_disc; /* allow dynamics HA discovery */	int agentadv; /* whether to send agent advertisements or not */	int interval; /* interval to send advertisements */	struct in_addr force_addr; /* which source address to use if multiple				    * addresses available for interface */	/* other data */	int if_index;	struct in_addr addr; /* local address to be used for this interface */	struct in_addr bcaddr; /* broadcast address of this interfaced; used				* used with HA discovery */	struct timeval last_adv;	int icmp_sock, udp_sock, udp_bc_sock, udp_bc_sock2;};struct ha_config {        int max_bindings;        int ha_default_tunnel_lifetime;        int reg_error_reply_interval;        struct list spi_list;        /* struct spi_entry */	struct list authorized_list; /* struct authorized_entry */	struct list fa_spi_list;     /* struct fa_spi_entry */	struct list interfaces;      /* struct interface_entry */        int syslog_facility;        char ha_api_read_socket_path[MAXFILENAMELEN + 1];        char ha_api_read_socket_group[MAXGROUPNAMELEN + 1];        char ha_api_read_socket_owner[MAXOWNERNAMELEN + 1];        int ha_api_read_socket_permissions;        char ha_api_admin_socket_path[MAXFILENAMELEN + 1];        char ha_api_admin_socket_group[MAXGROUPNAMELEN + 1];        char ha_api_admin_socket_owner[MAXOWNERNAMELEN + 1];        int ha_api_admin_socket_permissions;	int udpport;	int socket_priority;	int enable_triangle_tunneling;	int enable_reverse_tunneling;	int pubkey_hash_method;	char ha_nai[MAX_NAI_LEN + 1];	int ha_nai_len;	struct in_addr sha_addr;	__u32 priv_ha;};struct spi_entry {        struct node node;	int spi;        int auth_alg;        int replay_method;	int timestamp_tolerance;	int max_lifetime;        unsigned char shared_secret[MAXSHAREDSECRETLEN];	int shared_secret_len;};struct authorized_entry {        struct node node;	int spi_low;	int spi_high;        struct in_addr network;	struct in_addr netmask;};struct fa_spi_entry {	struct node node;	int spi;	struct in_addr addr;	int alg;	unsigned char shared_secret[MAXSHAREDSECRETLEN];	int shared_secret_len;};int load_config(struct ha_config *ha, char *program_name, char *config_file);void cleanup_config(struct ha_config *cfg);#endif /* HA_CONFIG_H */

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -