📄 dyn_falib.h
字号:
/* $Id: dyn_falib.h,v 1.8 2001/03/07 19:32:47 jm Exp $ * Dynamics Foreign 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_FALIB_H#define DYN_FALIB_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_fa_init(char *agent);/* Get list of tunnels in agent. * Parameters: * tunnel_count - storage for tunnel count * data - storage for tunnel ids * timout - call timeout. If -1 call blocks. * Returns API_SUCCESS or API error value */int dynamics_fa_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_fa_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_fa_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_fa_get_status(struct dynamics_fa_status *status, int timeout);/* Get string representation for dynamics error value. * Parameters: * err - error value * Returns pointer to error string. */char *dynamics_fa_get_error_string(int err);/* Get current agent path. * Returns pointer to current agent_path. */char *dynamics_fa_get_agent_path(void);int dynamics_fa_attach_socket_info(char *path);int dynamics_fa_detach_socket_info(char *path);int dynamics_fa_send_adv(struct dyn_param_adv *adv);#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -