📄 dyn_mnlib.h
字号:
/* $Id: dyn_mnlib.h,v 1.22 2000/07/21 15:13:31 ban Exp $ * Dynamics Mobile Node 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_MNLIB_H#define DYN_MNLIB_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_mn_init(char *agent);/* Get care-of address for the mobile * Paramters: * care_of_address - storage for care of address. * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_get_care_of_addr(struct in_addr * care_of_addr, int timeout);/* Get current tunneling mode * Parameters: * tunneling_mode - storage for the mode * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_get_tunneling_mode(int *tunneling_mode, int timeout);const char *dynamics_mn_tunnel_mode_desc(enum tunneling_modes);/* 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_mn_get_status(struct dynamics_mobile_status *status, int timeout);/* Connect to tunneling system and start tunneling. * Parameters: * tunneling_mode - mode for tunnel ( only API_FULL_TUNNEL is available) * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_connect(int tunneling_mode, int timeout);/* Disconnect from tunneling system. Call returns succesfully, when connection has been established. Tunnel is not verified. * Parameters: * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_disconnect(int timeout);/* Inform agent, that we have changed our location and we have a new IP-address. If address is same as agent's home address, tunneling is disabled and mobile is connected directly to local network. Call returns without waiting the tunnel updating. * Parameters: * new_addr - new local address used in network interace. * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_update_location(struct in_addr * new_addr, int timeout);int dynamics_mn_update_location_dev(char *device, int timeout);int dynamics_mn_update_location_block(struct in_addr * new_addr, int timeout);int dynamics_mn_update_location_dev_block(char *device, int timeout);/* Confirm tunnel by forcing registration message to go to Home Agent. Call returns successfully, when regisration is accepted. * Parameters: * * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_confirm(int timeout);/* Force MN to select specified FA. Advertisements from other FA's will be discarded. Fa forcing persists through reconnections until agent is restarted. To remove forcing, set FA address to 0.0.0.0. * Parameters: * fa_addr -IP-address of FA to use. * timeout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_mn_force_fa(struct in_addr *fa_addr, int timeout);int dynamics_mn_get_fa_list(int *fa_count, struct dynamics_mobile_fa_list *data, int timeout);int dynamics_mn_get_fa_info(struct dynamics_mobile_fa_info *data, int timeout);int dynamics_mn_iw_get_ch(int *max_num_if, struct dynamics_mn_iw_ch_info *info, int timeout);int dynamics_mn_iw_set_ch(int channel, char *ifname, int timeout);int dynamics_mn_rescan(int timeout);int dynamics_mn_register_dev_info_socket(char *path, int timeout);int dynamics_mn_policy_off(char *policy, int timeout);int dynamics_mn_policy_on(char *policy, int timeout);int dynamics_mn_get_policy(char *buffer, int len, int timeout);int dynamics_mn_get_mon_conf(char *buffer, int len, int timeout);int dynamics_mn_get_mon_conf_var(char *variable, int varlen, char *buffer, int buflen, int timeout);int dynamics_mn_set_mon_conf_var(char *variable, int len, int value, int timeout);/* Get string representation for dynamics error value. * Parameters: * err - error value * Returns pointer to error string. */char *dynamics_mn_get_error_string(int err);/* Get current agent path. * Returns pointer to current agent_path. */char *dynamics_mn_get_agent_path(void);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -