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

📄 dyn_halib.h

📁 mobile ip 在linux下的一种实现
💻 H
字号:
/* $Id: dyn_halib.h,v 1.7 2000/11/04 17:07:55 jm Exp $ * Dynamics Home Agent API support library interface * * Dynamic hierarchial IP tunnel * Copyright (C) 1998-2000, 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 DYN_HALIB_H#define DYN_HALIB_H#include <sys/types.h>#include "dyn_api.h"/* Initializes library. Must be run first before any other library *  function is called.  * Parameters: *   agent - path to agents API domain socket. If NULL default path is used. * Returns API_SUCCESS or API_FAILED  */int dynamics_ha_init(char *agent);/* Get list of tunnels in agent. * Parameters: *   tunnel_count - storage for tunnel count *   data         - storage for tunnel ids *   timeout       - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_ha_get_tunnels(int *tunnel_count, dyn_tunnel_id *data, 			    int timeout); /* Get info on particular tunnel. * Parameters: *   id           - id for tunnel to fetch *   data         - storage for tunnel data *   size_of_data - must be set to size of storage buffer,  *                  successful call sets this to actual sizeof data.  *   timeout       - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_ha_get_tunnel_info(dyn_tunnel_id id, 				struct dynamics_tunnel_info *data, 				int *size_of_data, int timeout); /* Destroy a tunnel. * Parameters: *   id           - id for tunnel to fetch *   timeout       - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_ha_destroy_tunnel(dyn_tunnel_id id, int timeout); /* Get status info from agent * Parameters: *   status  - storage for status information      *   timeout  - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_ha_get_status(struct dynamics_ha_status *status, 			   int timeout);/* Allow or reject the mobile's connections to HA. Mobile should be defined in HA's * configuration file. * Parameters: *   mobile_addr - IP address of the mobile *   enable      - If nonzero, connections are allowed, if zero connection *                 will be rejected. *   timeout     - call timeout. If -1 call blocks. * Returns  API_SUCCESS or API error value*/int dynamics_ha_enable_mobile(struct in_addr mobile_addr, int enable,			      int timeout); /* Get care-of address for the mobile * Paramters: *   mobile_addr      - IP address of the mobile *   care_of_address  - storage for care of address. *   timeout          - call timeout. If -1 call blocks. * Returns  API_SUCCESS or API error value */   int dynamics_ha_get_care_of_addr(struct in_addr mobile_addr, 				 struct in_addr *care_of_addr,				 int timeout); /* Get string representation for dynamics error value. * Parameters: *   err - error value * Returns pointer to error string. */char *dynamics_ha_get_error_string(int err);/* Get current agent path. * Returns pointer to current agent_path. */char *dynamics_ha_get_agent_path(void);/* Reload Home Agent configuration */int *dynamics_reload_config(int timeout);#endif

⌨️ 快捷键说明

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