libosmo-sigtran 2.1.0.134-a6b3
Osmocom SIGTRAN library
ss7_asp_vty.c File Reference
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <string.h>
#include <netdb.h>
#include <arpa/inet.h>
#include <sys/ioctl.h>
#include <osmocom/core/sockaddr_str.h>
#include <osmocom/vty/vty.h>
#include <osmocom/vty/command.h>
#include <osmocom/vty/logging.h>
#include <osmocom/vty/telnet_interface.h>
#include <osmocom/vty/misc.h>
#include <osmocom/netif/stream.h>
#include <osmocom/sigtran/osmo_ss7.h>
#include "xua_internal.h"
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_combined_linkset.h"
#include <ss7_linkset.h>
#include "ss7_internal.h"
#include "ss7_vty.h"
#include <netinet/tcp.h>

Macros

#define ASP_SCTP_PARAM_INIT_DESC
 
#define ASP_SCTP_PARAM_INIT_FIELDS   "(num-ostreams|max-instreams|max-attempts|timeout)"
 
#define ASP_TCP_PARAM_DESC   "Configure TCP parameters\n"
 
#define ASP_TCP_PARAM_KEEPALIVE_DESC
 
#define ASP_TCP_PARAM_KEEPALIVE_CFG_DESC
 
#define ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS   "(time|intvl|probes)"
 
#define ASP_TCP_PARAM_USER_TIMEOUT_DESC
 

Functions

 DEFUN_ATTR (cs7_asp, cs7_asp_cmd, "asp NAME <0-65535> <0-65535> " XUA_VAR_STR, "Configure Application Server Process\n" "Name of ASP\n" "Remote port number\n" "Local port number\n" XUA_VAR_HELP_STR, CMD_ATTR_NODE_EXIT)
 
 ALIAS_ATTR (cs7_asp, cs7_asp_trans_proto_cmd, "asp NAME <0-65535> <0-65535> " XUA_VAR_STR " " IPPROTO_VAR_STR, "Configure Application Server Process\n" "Name of ASP\n" "Remote port number\n" "Local port number\n" XUA_VAR_HELP_STR IPPROTO_VAR_HELP_STR, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (no_cs7_asp, no_cs7_asp_cmd, "no asp NAME", NO_STR "Disable Application Server Process\n" "Name of ASP\n", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (asp_local_ip, asp_local_ip_cmd, "local-ip " VTY_IPV46_CMD " [primary]", "Specify Local IP Address from which to contact ASP\n" "Local IPv4 Address from which to contact of ASP\n" "Local IPv6 Address from which to contact of ASP\n" "Signal the SCTP peer to use this address as Primary Address\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_local_ip, asp_no_local_ip_cmd, "no local-ip " VTY_IPV46_CMD, NO_STR "Specify Local IP Address from which to contact ASP\n" "Local IPv4 Address from which to contact of ASP\n" "Local IPv6 Address from which to contact of ASP\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_remote_ip, asp_remote_ip_cmd, "remote-ip " VTY_IPV46_CMD " [primary]", "Specify Remote IP Address of ASP\n" "Remote IPv4 Address of ASP\n" "Remote IPv6 Address of ASP\n" "Set remote address as SCTP Primary Address\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_remote_ip, asp_no_remote_ip_cmd, "no remote-ip " VTY_IPV46_CMD, NO_STR "Specify Remote IP Address of ASP\n" "Remote IPv4 Address of ASP\n" "Remote IPv6 Address of ASP\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_qos_clas, asp_qos_class_cmd, "qos-class " QOS_CLASS_RANGE_STR, "Specify QoS Class of ASP\n" QOS_CLASS_RANGE_HELP_STR, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_role, asp_role_cmd, "role (sg|asp|ipsp)", "Specify the xUA role for this ASP\n" "SG (Signaling Gateway)\n" "ASP (Application Server Process)\n" "IPSP (IP Signalling Point)\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_transport_role, asp_transport_role_cmd, "transport-role (client|server)", "Specify the transport layer role for this ASP\n" "Operate as a client; connect to a server\n" "Operate as a server; wait for client connections\n", CMD_ATTR_NODE_EXIT)
 
 ALIAS_ATTR (asp_transport_role, asp_sctp_role_cmd, "sctp-role (client|server)", "Specify the SCTP role for this ASP\n" "Operate as SCTP client; connect to a server\n" "Operate as SCTP server; wait for client connections\n", CMD_ATTR_HIDDEN|CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_sctp_param_init, asp_sctp_param_init_cmd, "sctp-param init " ASP_SCTP_PARAM_INIT_FIELDS " <0-65535>", ASP_SCTP_PARAM_INIT_DESC "Value of the parameter\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_sctp_param_init, asp_no_sctp_param_init_cmd, "no sctp-param init " ASP_SCTP_PARAM_INIT_FIELDS, NO_STR ASP_SCTP_PARAM_INIT_DESC, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_tcp_param_keepalive_enabled, asp_tcp_param_keepalive_enabled_cmd, "tcp-param keepalive enabled", ASP_TCP_PARAM_KEEPALIVE_DESC "Enable TCP keep-alive\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_tcp_param_keepalive, asp_no_tcp_param_keepalive_cmd, "no tcp-param keepalive", NO_STR ASP_TCP_PARAM_KEEPALIVE_DESC, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_tcp_param_keepalive_cfg, asp_tcp_param_keepalive_cfg_cmd, "tcp-param keepalive " ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS " <0-65535>", ASP_TCP_PARAM_KEEPALIVE_CFG_DESC "Value of the parameter\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_tcp_param_keepalive_cfg, asp_no_tcp_param_keepalive_cfg_cmd, "no tcp-param keepalive " ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS, NO_STR ASP_TCP_PARAM_KEEPALIVE_CFG_DESC, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_tcp_param_user_timeout, asp_tcp_param_user_timeout_cmd, "tcp-param user-timeout <0-65535>", ASP_TCP_PARAM_USER_TIMEOUT_DESC "Value of the parameter\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_tcp_param_user_timeout, asp_no_tcp_param_user_timeout_cmd, "no tcp-param user-timeout", NO_STR ASP_TCP_PARAM_USER_TIMEOUT_DESC, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_shutdown, asp_shutdown_cmd, "shutdown", "Terminates SCTP association; New associations will be rejected\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_no_shutdown, asp_no_shutdown_cmd, "no shutdown", NO_STR "Terminates SCTP association; New associations will be rejected\n", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_quirk, asp_quirk_cmd, "OVERWRITTEN", "OVERWRITTEN\n", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (asp_no_quirk, asp_no_quirk_cmd, "OVERWRITTEN", "OVERWRITTEN\n", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (asp_timer_xua, asp_timer_xua_cmd, NULL, NULL, CMD_ATTR_IMMEDIATE)
 
static void gen_asp_timer_xua_cmd_strs (struct cmd_element *cmd)
 
 DEFUN_ATTR (asp_timer_lm, asp_timer_lm_cmd, NULL, NULL, CMD_ATTR_IMMEDIATE)
 
static void gen_asp_timer_lm_cmd_strs (struct cmd_element *cmd)
 
static void write_asp_timers_xua (struct vty *vty, const char *indent, struct osmo_ss7_asp *asp)
 
static void write_asp_timers_lm (struct vty *vty, const char *indent, struct osmo_ss7_asp *asp)
 
static char * as_list_for_asp (const struct osmo_ss7_asp *asp, char *buf, size_t buf_len)
 
static char * get_sockname_buf (char *buf, size_t buf_len, int fd, int proto, bool local)
 
static void show_one_asp (struct vty *vty, struct osmo_ss7_asp *asp)
 
static int show_asp (struct vty *vty, int id, const char *asp_name)
 
 DEFUN (show_cs7_asp, show_cs7_asp_cmd, "show cs7 instance <0-15> asp", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n")
 
 DEFUN (show_cs7_asp_name, show_cs7_asp_name_cmd, "show cs7 instance <0-15> asp name ASP_NAME", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n" "Lookup ASP with a given name\n" "Name of the Application Server Process (ASP)\n")
 
static void show_one_asp_remaddr_tcp (struct vty *vty, struct osmo_ss7_asp *asp)
 
static void show_one_asp_remaddr (struct vty *vty, struct osmo_ss7_asp *asp)
 
static int show_asp_remaddr (struct vty *vty, int id, const char *asp_name)
 
 DEFUN (show_cs7_asp_remaddr, show_cs7_asp_remaddr_cmd, "show cs7 instance <0-15> asp-remaddr", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) remote addresses information\n")
 
 DEFUN (show_cs7_asp_remaddr_name, show_cs7_asp_remaddr_name_cmd, "show cs7 instance <0-15> asp-remaddr name ASP_NAME", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) remote addresses information\n" "Lookup ASP with a given name\n" "Name of the Application Server Process (ASP)\n")
 
static void show_one_asp_assoc_status_tcp (struct vty *vty, struct osmo_ss7_asp *asp)
 
static void show_one_asp_assoc_status (struct vty *vty, struct osmo_ss7_asp *asp)
 
static int show_asp_assoc_status (struct vty *vty, int id, const char *asp_name)
 
 DEFUN (show_cs7_asp_assoc_status, show_cs7_asp_assoc_status_cmd, "show cs7 instance <0-15> asp-assoc-status", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) SCTP association status\n")
 
 DEFUN (show_cs7_asp_assoc_status_name, show_cs7_asp_assoc_status_name_cmd, "show cs7 instance <0-15> asp-assoc-status name ASP_NAME", SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) SCTP association information\n" "Lookup ASP with a given name\n" "Name of the Application Server Process (ASP)\n")
 
void ss7_vty_write_one_asp (struct vty *vty, struct osmo_ss7_asp *asp, bool show_dyn_config)
 
int ss7_vty_node_asp_go_parent (struct vty *vty)
 
void ss7_vty_init_node_asp (void)
 

Variables

static struct cmd_node asp_node
 
static const struct value_string tcp_info_state_values []
 
static const struct value_string asp_quirk_names []
 
static const struct value_string asp_quirk_descs []
 

Macro Definition Documentation

◆ ASP_SCTP_PARAM_INIT_DESC

#define ASP_SCTP_PARAM_INIT_DESC
Value:
"Configure SCTP parameters\n" \
"Configure INIT related parameters\n" \
"Configure INIT Number of Outbound Streams\n" \
"Configure INIT Maximum Inboud Streams\n" \
"Configure INIT Maximum Attempts\n" \
"Configure INIT Timeout (milliseconds)\n"

◆ ASP_SCTP_PARAM_INIT_FIELDS

#define ASP_SCTP_PARAM_INIT_FIELDS   "(num-ostreams|max-instreams|max-attempts|timeout)"

◆ ASP_TCP_PARAM_DESC

#define ASP_TCP_PARAM_DESC   "Configure TCP parameters\n"

◆ ASP_TCP_PARAM_KEEPALIVE_CFG_DESC

#define ASP_TCP_PARAM_KEEPALIVE_CFG_DESC
Value:
"Configure number of seconds a connection needs to be idle before beggining to send probes\n" \
"Configure number of seconds between probes\n" \
"Configure max number of probes to send before giving up if no response is obtained\n"
#define ASP_TCP_PARAM_KEEPALIVE_DESC
Definition: ss7_asp_vty.c:449

◆ ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS

#define ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS   "(time|intvl|probes)"

◆ ASP_TCP_PARAM_KEEPALIVE_DESC

#define ASP_TCP_PARAM_KEEPALIVE_DESC
Value:
"Configure TCP keep-alive related parameters\n"
#define ASP_TCP_PARAM_DESC
Definition: ss7_asp_vty.c:448

◆ ASP_TCP_PARAM_USER_TIMEOUT_DESC

#define ASP_TCP_PARAM_USER_TIMEOUT_DESC
Value:
"Configure TCP User Timeout socket option (TCP_USER_TIMEOUT)\n"

Function Documentation

◆ ALIAS_ATTR() [1/2]

ALIAS_ATTR ( asp_transport_role  ,
asp_sctp_role_cmd  ,
"sctp-role (client|server)"  ,
"Specify the SCTP role for this ASP\n" "Operate as SCTP client; connect to a server\n" "Operate as SCTP server; wait for client connections\n"  ,
CMD_ATTR_HIDDEN|  CMD_ATTR_NODE_EXIT 
)

◆ ALIAS_ATTR() [2/2]

ALIAS_ATTR ( cs7_asp  ,
cs7_asp_trans_proto_cmd  ,
"asp NAME <0-65535> <0-65535> " XUA_VAR_STR " "  IPPROTO_VAR_STR,
"Configure Application Server Process\n" "Name of ASP\n" "Remote port number\n" "Local port number\n" XUA_VAR_HELP_STR  IPPROTO_VAR_HELP_STR,
CMD_ATTR_NODE_EXIT   
)

◆ as_list_for_asp()

static char * as_list_for_asp ( const struct osmo_ss7_asp asp,
char *  buf,
size_t  buf_len 
)
static

◆ DEFUN() [1/6]

DEFUN ( show_cs7_asp  ,
show_cs7_asp_cmd  ,
"show cs7 instance <0-15> asp"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n"   
)

References NULL, and show_asp().

◆ DEFUN() [2/6]

DEFUN ( show_cs7_asp_assoc_status  ,
show_cs7_asp_assoc_status_cmd  ,
"show cs7 instance <0-15> asp-assoc-status"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) SCTP association status\n"   
)

References NULL, and show_asp_assoc_status().

◆ DEFUN() [3/6]

DEFUN ( show_cs7_asp_assoc_status_name  ,
show_cs7_asp_assoc_status_name_cmd  ,
"show cs7 instance <0-15> asp-assoc-status name ASP_NAME"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) SCTP association information\n" "Lookup ASP with a given name\n" "Name of the Application Server Process (ASP)\n"   
)

◆ DEFUN() [4/6]

DEFUN ( show_cs7_asp_name  ,
show_cs7_asp_name_cmd  ,
"show cs7 instance <0-15> asp name ASP_NAME"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP)\n" "Lookup ASP with a given name\n" "Name of the Application Server Process (ASP)\n"   
)

References show_asp().

◆ DEFUN() [5/6]

DEFUN ( show_cs7_asp_remaddr  ,
show_cs7_asp_remaddr_cmd  ,
"show cs7 instance <0-15> asp-remaddr"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) remote addresses information\n"   
)

References NULL, and show_asp_remaddr().

◆ DEFUN() [6/6]

DEFUN ( show_cs7_asp_remaddr_name  ,
show_cs7_asp_remaddr_name_cmd  ,
"show cs7 instance <0-15> asp-remaddr name ASP_NAME"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server Process (ASP) remote addresses information\n" "Lookup ASP with a given name\n" "Name of the Application Server Process (ASP)\n"   
)

References show_asp_remaddr().

◆ DEFUN_ATTR() [1/24]

DEFUN_ATTR ( asp_block  ,
asp_block_cmd  ,
"block"  ,
"Allows a SCTP Association with  ASP,
but doesn 't let it become active\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [2/24]

DEFUN_ATTR ( asp_local_ip  ,
asp_local_ip_cmd  ,
"local-ip " VTY_IPV46_CMD " "  [primary],
"Specify Local IP Address from which to contact ASP\n" "Local IPv4 Address from which to contact of ASP\n" "Local IPv6 Address from which to contact of ASP\n" "Signal the SCTP peer to use this address as Primary Address\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [3/24]

DEFUN_ATTR ( asp_no_local_ip  ,
asp_no_local_ip_cmd  ,
"no local-ip "  VTY_IPV46_CMD,
NO_STR "Specify Local IP Address from which to contact ASP\n" "Local IPv4 Address from which to contact of ASP\n" "Local IPv6 Address from which to contact of ASP\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [4/24]

DEFUN_ATTR ( asp_no_quirk  ,
asp_no_quirk_cmd  ,
"OVERWRITTEN"  ,
"OVERWRITTEN\n"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [5/24]

DEFUN_ATTR ( asp_no_remote_ip  ,
asp_no_remote_ip_cmd  ,
"no remote-ip "  VTY_IPV46_CMD,
NO_STR "Specify Remote IP Address of ASP\n" "Remote IPv4 Address of ASP\n" "Remote IPv6 Address of ASP\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [6/24]

DEFUN_ATTR ( asp_no_sctp_param_init  ,
asp_no_sctp_param_init_cmd  ,
"no sctp-param init "  ASP_SCTP_PARAM_INIT_FIELDS,
NO_STR  ASP_SCTP_PARAM_INIT_DESC,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [7/24]

DEFUN_ATTR ( asp_no_shutdown  ,
asp_no_shutdown_cmd  ,
"no shutdown"  ,
NO_STR "Terminates SCTP association; New associations will be rejected\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [8/24]

DEFUN_ATTR ( asp_no_tcp_param_keepalive  ,
asp_no_tcp_param_keepalive_cmd  ,
"no tcp-param keepalive"  ,
NO_STR  ASP_TCP_PARAM_KEEPALIVE_DESC,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [9/24]

DEFUN_ATTR ( asp_no_tcp_param_keepalive_cfg  ,
asp_no_tcp_param_keepalive_cfg_cmd  ,
"no tcp-param keepalive "  ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS,
NO_STR  ASP_TCP_PARAM_KEEPALIVE_CFG_DESC,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [10/24]

DEFUN_ATTR ( asp_no_tcp_param_user_timeout  ,
asp_no_tcp_param_user_timeout_cmd  ,
"no tcp-param user-timeout"  ,
NO_STR  ASP_TCP_PARAM_USER_TIMEOUT_DESC,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [11/24]

DEFUN_ATTR ( asp_qos_clas  ,
asp_qos_class_cmd  ,
"qos-class "  QOS_CLASS_RANGE_STR,
"Specify QoS Class of ASP\n"  QOS_CLASS_RANGE_HELP_STR,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [12/24]

DEFUN_ATTR ( asp_quirk  ,
asp_quirk_cmd  ,
"OVERWRITTEN"  ,
"OVERWRITTEN\n"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [13/24]

DEFUN_ATTR ( asp_remote_ip  ,
asp_remote_ip_cmd  ,
"remote-ip " VTY_IPV46_CMD " "  [primary],
"Specify Remote IP Address of ASP\n" "Remote IPv4 Address of ASP\n" "Remote IPv6 Address of ASP\n" "Set remote address as SCTP Primary Address\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [14/24]

DEFUN_ATTR ( asp_role  ,
asp_role_cmd  ,
"role (sg|asp|ipsp)"  ,
"Specify the xUA role for this ASP\n" "SG (Signaling Gateway)\n" "ASP (Application Server Process)\n" "IPSP (IP Signalling Point)\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [15/24]

◆ DEFUN_ATTR() [16/24]

DEFUN_ATTR ( asp_shutdown  ,
asp_shutdown_cmd  ,
"shutdown"  ,
"Terminates SCTP association; New associations will be rejected\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [17/24]

DEFUN_ATTR ( asp_tcp_param_keepalive_cfg  ,
asp_tcp_param_keepalive_cfg_cmd  ,
"tcp-param keepalive " ASP_TCP_PARAM_KEEPALIVE_CFG_FIELDS " <0-65535>"  ,
ASP_TCP_PARAM_KEEPALIVE_CFG_DESC "Value of the parameter\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [18/24]

DEFUN_ATTR ( asp_tcp_param_keepalive_enabled  ,
asp_tcp_param_keepalive_enabled_cmd  ,
"tcp-param keepalive enabled"  ,
ASP_TCP_PARAM_KEEPALIVE_DESC "Enable TCP keep-alive\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [19/24]

DEFUN_ATTR ( asp_tcp_param_user_timeout  ,
asp_tcp_param_user_timeout_cmd  ,
"tcp-param user-timeout <0-65535>"  ,
ASP_TCP_PARAM_USER_TIMEOUT_DESC "Value of the parameter\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [20/24]

DEFUN_ATTR ( asp_timer_lm  ,
asp_timer_lm_cmd  ,
NULL  ,
NULL  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [21/24]

DEFUN_ATTR ( asp_timer_xua  ,
asp_timer_xua_cmd  ,
NULL  ,
NULL  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [22/24]

DEFUN_ATTR ( asp_transport_role  ,
asp_transport_role_cmd  ,
"transport-role (client|server)"  ,
"Specify the transport layer role for this ASP\n" "Operate as a client; connect to a server\n" "Operate as a server; wait for client connections\n"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [23/24]

DEFUN_ATTR ( cs7_asp  ,
cs7_asp_cmd  ,
"asp NAME <0-65535> <0-65535> "  XUA_VAR_STR,
"Configure Application Server Process\n" "Name of ASP\n" "Remote port number\n" "Local port number\n"  XUA_VAR_HELP_STR,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [24/24]

DEFUN_ATTR ( no_cs7_asp  ,
no_cs7_asp_cmd  ,
"no asp NAME"  ,
NO_STR "Disable Application Server Process\n" "Name of ASP\n"  ,
CMD_ATTR_IMMEDIATE   
)

◆ gen_asp_timer_lm_cmd_strs()

static void gen_asp_timer_lm_cmd_strs ( struct cmd_element *  cmd)
static

◆ gen_asp_timer_xua_cmd_strs()

static void gen_asp_timer_xua_cmd_strs ( struct cmd_element *  cmd)
static

◆ get_sockname_buf()

static char * get_sockname_buf ( char *  buf,
size_t  buf_len,
int  fd,
int  proto,
bool  local 
)
static

References NULL.

Referenced by show_one_asp().

◆ show_asp()

static int show_asp ( struct vty *  vty,
int  id,
const char *  asp_name 
)
static

◆ show_asp_assoc_status()

static int show_asp_assoc_status ( struct vty *  vty,
int  id,
const char *  asp_name 
)
static

◆ show_asp_remaddr()

static int show_asp_remaddr ( struct vty *  vty,
int  id,
const char *  asp_name 
)
static

◆ show_one_asp()

◆ show_one_asp_assoc_status()

static void show_one_asp_assoc_status ( struct vty *  vty,
struct osmo_ss7_asp asp 
)
static

◆ show_one_asp_assoc_status_tcp()

static void show_one_asp_assoc_status_tcp ( struct vty *  vty,
struct osmo_ss7_asp asp 
)
static

◆ show_one_asp_remaddr()

static void show_one_asp_remaddr ( struct vty *  vty,
struct osmo_ss7_asp asp 
)
static

◆ show_one_asp_remaddr_tcp()

static void show_one_asp_remaddr_tcp ( struct vty *  vty,
struct osmo_ss7_asp asp 
)
static

◆ ss7_vty_init_node_asp()

void ss7_vty_init_node_asp ( void  )

◆ ss7_vty_node_asp_go_parent()

◆ ss7_vty_write_one_asp()

void ss7_vty_write_one_asp ( struct vty *  vty,
struct osmo_ss7_asp asp,
bool  show_dyn_config 
)

◆ write_asp_timers_lm()

static void write_asp_timers_lm ( struct vty *  vty,
const char *  indent,
struct osmo_ss7_asp asp 
)
static

◆ write_asp_timers_xua()

static void write_asp_timers_xua ( struct vty *  vty,
const char *  indent,
struct osmo_ss7_asp asp 
)
static

Variable Documentation

◆ asp_node

struct cmd_node asp_node
static
Initial value:
= {
L_CS7_ASP_NODE,
"%s(config-cs7-asp)# ",
1,
}

Referenced by ss7_vty_init_node_asp().

◆ asp_quirk_descs

const struct value_string asp_quirk_descs[]
static
Initial value:
= {
{ OSMO_SS7_ASP_QUIRK_NO_NOTIFY, "Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP" },
{ OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP, "Allow Rx of DAUD in ASP role" },
{ OSMO_SS7_ASP_QUIRK_SNM_INACTIVE, "Allow Rx of [S]SNM in AS-INACTIVE state" },
{ 0, NULL }
}
#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE
Accept SSNM even if ASP is in AS-INACTIVE state.
Definition: osmo_ss7.h:268
#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY
Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP procedure.
Definition: osmo_ss7.h:264
int and can be left NULL
Definition: osmo_ss7.h:364
#define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP
Accept DAUD in ASP role (RFC states only permitted in ASP->SG role)
Definition: osmo_ss7.h:266

Referenced by ss7_vty_init_node_asp().

◆ asp_quirk_names

const struct value_string asp_quirk_names[]
static
Initial value:
= {
{ OSMO_SS7_ASP_QUIRK_NO_NOTIFY, "no_notify" },
{ OSMO_SS7_ASP_QUIRK_DAUD_IN_ASP, "daud_in_asp" },
{ OSMO_SS7_ASP_QUIRK_SNM_INACTIVE, "snm_inactive" },
{ 0, NULL }
}

Referenced by DEFUN_ATTR(), ss7_vty_init_node_asp(), and ss7_vty_write_one_asp().

◆ tcp_info_state_values

const struct value_string tcp_info_state_values[]
static
Initial value:
= {
{ TCP_ESTABLISHED, "ESTABLISHED" },
{ TCP_SYN_SENT, "SYN_SENT" },
{ TCP_SYN_RECV, "SYN_RECV" },
{ TCP_FIN_WAIT1, "FIN_WAIT1" },
{ TCP_FIN_WAIT2, "FIN_WAIT2" },
{ TCP_TIME_WAIT, "TIME_WAIT" },
{ TCP_CLOSE, "CLOSE" },
{ TCP_CLOSE_WAIT, "CLOSE_WAIT" },
{ TCP_LAST_ACK, "LAST_ACK" },
{ TCP_LISTEN, "LISTEN" },
{ TCP_CLOSING, "CLOSING" },
{}
}

Referenced by show_one_asp_assoc_status_tcp(), and show_one_asp_remaddr_tcp().