libosmo-sigtran  1.9.0.4-dc82
Osmocom SIGTRAN library
osmo_ss7_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 <osmocom/sigtran/protocol/mtp.h>
#include "xua_internal.h"
#include <osmocom/sigtran/sccp_sap.h>
#include "sccp_internal.h"
#include "ss7_internal.h"
#include <netinet/tcp.h>

Data Structures

struct  osmo_sccp_addr_entry
 

Macros

#define XUA_VAR_STR   "(sua|m3ua|ipa)"
 
#define XUA_VAR_HELP_STR
 
#define IPPROTO_VAR_STR   "(sctp|tcp)"
 
#define IPPROTO_VAR_HELP_STR
 
#define XUA_SRV_SCTP_PARAM_INIT_DESC
 
#define XUA_SRV_SCTP_PARAM_INIT_FIELDS   "(num-ostreams|max-instreams)"
 
#define SHOW_CS7_XUA_CMD   "show cs7 " XUA_VAR_STR
 
#define SHOW_CS7_XUA_CMD_HELP   SHOW_STR CS7_STR XUA_VAR_HELP_STR
 
#define ASP_SCTP_PARAM_INIT_DESC
 
#define ASP_SCTP_PARAM_INIT_FIELDS   "(num-ostreams|max-instreams|max-attempts|timeout)"
 
#define ROUTING_KEY_CMD   "routing-key RCONTEXT DPC"
 
#define ROUTING_KEY_CMD_STRS
 
#define ROUTING_KEY_SI_ARG   " si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup)"
 
#define ROUTING_KEY_SI_ARG_STRS
 
#define ROUTING_KEY_SSN_ARG   " ssn SSN"
 
#define ROUTING_KEY_SSN_ARG_STRS
 

Enumerations

enum  cs7_role_t { CS7_ROLE_SG, CS7_ROLE_ASP }
 

Functions

 DEFUN_ATTR (cs7_instance, cs7_instance_cmd, "cs7 instance <0-15>", CS7_STR "Configure a SS7 Instance\ INST_STR "Number of the instance\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_net_ind, cs7_net_ind_cmd, "network-indicator (international | national | reserved | spare)", "Configure the Network Indicator\ "International Network\" "National Network\" "Reserved Network\" "Spare Network\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_pc_format, cs7_pc_format_cmd, "point-code format <1-24> [<1-23>] [<1-22>]", PC_STR "Configure Point Code Format\ "Length of first PC component\" "Length of second PC component\" "Length of third PC component\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_pc_format_def, cs7_pc_format_def_cmd, "point-code format default", PC_STR "Configure Point Code Format\ "Default Point Code Format(3.8.3)\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_pc_delimiter, cs7_pc_delimiter_cmd, "point-code delimiter (default|dash)", PC_STR "Configure Point Code Delimiter\ "Use dot as delimiter\" "User dash as delimiter\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_point_code, cs7_point_code_cmd, "point-code POINT_CODE", "Configure the local Point Code\ "Point Code\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_permit_dyn_rkm, cs7_permit_dyn_rkm_cmd, "xua rkm routing-key-allocation (static-only|dynamic-permitted)", "SIGTRAN xxxUA related\ "Routing Key Management\" "Routing Key Management Allocation Policy\" "Only static(pre-configured) Routing Keys permitted\" "Dynamically allocate Routing Keys for what ASPs request\", CMD_ATTR_IMMEDIATE)
 
static void write_one_cs7 (struct vty *vty, struct osmo_ss7_instance *inst, bool show_dyn_config)
 
static int write_all_cs7 (struct vty *vty, bool show_dyn_config)
 
static int config_write_cs7 (struct vty *vty)
 
 DEFUN (show_cs7_user, show_cs7_user_cmd, "show cs7 instance <0-15> users", SHOW_STR CS7_STR INST_STR INST_STR "User Table\)
 
 DEFUN_ATTR (cs7_route_table, cs7_route_table_cmd, "route-table system", "Specify the name of the route table\ "Name of the route table\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_rt_upd, cs7_rt_upd_cmd, "update route POINT_CODE MASK linkset LS_NAME [priority PRIO] [qos-class (CLASS|default)]", "Update the Route\ "Update the Route\" "Destination Point Code\" "Point Code Mask\" "Point Code Length\" "Specify Destination Linkset\" "Linkset Name\" "Specify Priority\" "Priority\" "Specify QoS Class\" "QoS Class\" "Default QoS Class\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_rt_rem, cs7_rt_rem_cmd, "remove route POINT_CODE MASK", "Remove a Route\ "Remove a Route\" "Destination Point Code\" "Point Code Mask\" "Point Code Length\", CMD_ATTR_IMMEDIATE)
 
static void write_one_rtable (struct vty *vty, struct osmo_ss7_route_table *rtable)
 
static void vty_dump_rtable (struct vty *vty, struct osmo_ss7_route_table *rtbl)
 
 DEFUN (show_cs7_route, show_cs7_route_cmd, "show cs7 instance <0-15> route", SHOW_STR CS7_STR INST_STR INST_STR "Routing Table\)
 
static int parse_trans_proto (const char *protocol)
 
static enum osmo_ss7_asp_protocol parse_asp_proto (const char *protocol)
 
 DEFUN_ATTR (cs7_xua, cs7_xua_cmd, "listen " XUA_VAR_STR " <0-65534> [" IPPROTO_VAR_STR "]", "Configure/Enable xUA Listener\ XUA_VAR_HELP_STR "Port number\" IPPROTO_VAR_HELP_STR, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (no_cs7_xua, no_cs7_xua_cmd, "no listen " XUA_VAR_STR " <0-65534> [" IPPROTO_VAR_STR "]", NO_STR "Disable xUA Listener on given port\ XUA_VAR_HELP_STR "Port number\" IPPROTO_VAR_HELP_STR, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (xua_local_ip, xua_local_ip_cmd, "local-ip " VTY_IPV46_CMD, "Configure the Local IP Address for xUA\ "IPv4 Address to use for XUA\" "IPv6 Address to use for XUA\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (xua_no_local_ip, xua_no_local_ip_cmd, "no local-ip " VTY_IPV46_CMD, NO_STR "Configure the Local IP Address for xUA\ "IPv4 Address to use for XUA\" "IPv6 Address to use for XUA\", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (xua_accept_dyn_asp, xua_accept_dyn_asp_cmd, "accept-asp-connections (pre-configured|dynamic-permitted)", "Define what kind of ASP connections to accept\ "Accept only pre-configured ASPs(source IP/port)\" "Accept any connection and dynamically create an ASP definition\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (xua_sctp_param_init, xua_sctp_param_init_cmd, "sctp-param init " XUA_SRV_SCTP_PARAM_INIT_FIELDS " <0-65535>", XUA_SRV_SCTP_PARAM_INIT_DESC "Value of the parameter\, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (xua_no_sctp_param_init, xua_no_sctp_param_init_cmd, "no sctp-param init " XUA_SRV_SCTP_PARAM_INIT_FIELDS, NO_STR XUA_SRV_SCTP_PARAM_INIT_DESC, CMD_ATTR_NODE_EXIT)
 
static void write_one_xua (struct vty *vty, struct osmo_xua_server *xs)
 
static void vty_dump_xua_server (struct vty *vty, struct osmo_xua_server *xs)
 
static int _show_cs7_xua (struct vty *vty, enum osmo_ss7_asp_protocol proto, int trans_proto, int local_port)
 
 DEFUN (show_cs7_xua, show_cs7_xua_cmd, SHOW_CS7_XUA_CMD " [<0-65534>]", SHOW_CS7_XUA_CMD_HELP "Local Port Number\)
 
 DEFUN (show_cs7_xua_trans_proto, show_cs7_xua_trans_proto_cmd, SHOW_CS7_XUA_CMD " " IPPROTO_VAR_STR " [<0-65534>]", SHOW_CS7_XUA_CMD_HELP IPPROTO_VAR_HELP_STR "Local Port Number\)
 
 DEFUN (show_cs7_config, show_cs7_config_cmd, "show cs7 config", SHOW_STR CS7_STR "Currently running cs7 configuration")
 
 DEFUN (cs7_asp_disconnect, cs7_asp_disconnect_cmd, "cs7 instance <0-15> asp NAME disconnect", CS7_STR "Instance related commands\ "SS7 Instance Number\" "ASP related commands\" "Name of ASP\" "Disconnect the ASP(client will reconnect)\")
 
 DEFUN_ATTR (cs7_asp, cs7_asp_cmd, "asp NAME <0-65535> <0-65535> " XUA_VAR_STR, "Configure Application Server Process\ "Name of ASP\" "Remote port number\" "Local port number\" 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\ "Name of ASP\" "Remote port number\" "Local port number\" 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\ "Name of ASP\", 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\ "Local IPv4 Address from which to contact of ASP\" "Local IPv6 Address from which to contact of ASP\" "Signal the SCTP peer to use this address as Primary Address\", 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\ "Local IPv4 Address from which to contact of ASP\" "Local IPv6 Address from which to contact of ASP\", 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\ "Remote IPv4 Address of ASP\" "Remote IPv6 Address of ASP\" "Set remote address as SCTP Primary Address\", 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\ "Remote IPv4 Address of ASP\" "Remote IPv6 Address of ASP\", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_qos_clas, asp_qos_class_cmd, "qos-class <0-255>", "Specify QoS Class of ASP\ "QoS Class of ASP\", CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_role, asp_role_cmd, "role (sg|asp|ipsp)", "Specify the xUA role for this ASP\ "SG(Signaling Gateway)\" "ASP(Application Server Process)\" "IPSP(IP Signalling Point)\", 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\ "Operate as a client;connect to a server\" "Operate as a server;wait for client connections\", CMD_ATTR_NODE_EXIT)
 
 ALIAS_ATTR (asp_transport_role, asp_sctp_role_cmd, "sctp-role (client|server)", "Specify the SCTP role for this ASP\ "Operate as SCTP client;connect to a server\" "Operate as SCTP server;wait for client connections\", 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\, 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_block, asp_block_cmd, "block", "Allows a SCTP Association with ASP, but doesn't let it become active\, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_shutdown, asp_shutdown_cmd, "shutdown", "Terminates SCTP association; New associations will be rejected\, CMD_ATTR_NODE_EXIT)
 
 DEFUN_ATTR (asp_quirk, asp_quirk_cmd, "OVERWRITTEN", "OVERWRITTEN\, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (asp_no_quirk, asp_no_quirk_cmd, "OVERWRITTEN", "OVERWRITTEN\, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (asp_timer, asp_timer_cmd, NULL, NULL, CMD_ATTR_IMMEDIATE)
 
static void gen_asp_timer_cmd_strs (struct cmd_element *cmd)
 
static void write_asp_timers (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)\)
 
 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)\ "Lookup ASP with a given name\" "Name of the Application Server Process(ASP)\")
 
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\)
 
 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\ "Lookup ASP with a given name\" "Name of the Application Server Process(ASP)\")
 
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\)
 
 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\ "Lookup ASP with a given name\" "Name of the Application Server Process(ASP)\")
 
static void write_one_asp (struct vty *vty, struct osmo_ss7_asp *asp, bool show_dyn_config)
 
 DEFUN_ATTR (cs7_as, cs7_as_cmd, "as NAME " XUA_VAR_STR, "Configure an Application Server\ "Name of the Application Server\" XUA_VAR_HELP_STR, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (no_cs7_as, no_cs7_as_cmd, "no as NAME", NO_STR "Disable Application Server\ "Name of AS\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_asp, as_asp_cmd, "asp NAME", "Specify that a given ASP is part of this AS\ "Name of ASP to be added to AS\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_no_asp, as_no_asp_cmd, "no asp NAME", NO_STR "Specify ASP to be removed from this AS\ "Name of ASP to be removed\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_USRATTR (as_traf_mode, as_traf_mode_cmd, OSMO_SCCP_LIB_ATTR_RSTRT_ASP, "traffic-mode (broadcast | loadshare | roundrobin | override)", "Specifies traffic mode of operation of the ASP within the AS\ "Broadcast to all ASP within AS\" "Share Load among all ASP within AS\" "Round-Robin between all ASP within AS\" "Override\")
 
 DEFUN_USRATTR (as_no_traf_mode, as_no_traf_mode_cmd, OSMO_SCCP_LIB_ATTR_RSTRT_ASP, "no traffic-mode", NO_STR "Remove explicit traffic mode of operation of this AS\)
 
 DEFUN_ATTR (as_recov_tout, as_recov_tout_cmd, "recovery-timeout <1-2000>", "Specifies the recovery timeout value in milliseconds\ "Recovery Timeout in Milliseconds\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_qos_clas, as_qos_class_cmd, "qos-class <0-255>", "Specity QoS Class of AS\ "QoS Class of AS\", CMD_ATTR_IMMEDIATE)
 
static int _rout_key (struct vty *vty, const char *rcontext, const char *dpc, const char *si, const char *ssn)
 
 DEFUN_ATTR (as_rout_key, as_rout_key_cmd, ROUTING_KEY_CMD, ROUTING_KEY_CMD_STRS, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_rout_key_si, as_rout_key_si_cmd, ROUTING_KEY_CMD ROUTING_KEY_SI_ARG, ROUTING_KEY_CMD_STRS ROUTING_KEY_SI_ARG_STRS, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_rout_key_ssn, as_rout_key_ssn_cmd, ROUTING_KEY_CMD ROUTING_KEY_SSN_ARG, ROUTING_KEY_CMD_STRS ROUTING_KEY_SSN_ARG_STRS, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_rout_key_si_ssn, as_rout_key_si_ssn_cmd, ROUTING_KEY_CMD ROUTING_KEY_SI_ARG ROUTING_KEY_SSN_ARG, ROUTING_KEY_CMD_STRS ROUTING_KEY_SI_ARG_STRS ROUTING_KEY_SSN_ARG_STRS, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_pc_override, as_pc_override_cmd, "point-code override dpc PC", "Point Code Specific Features\ "Override(force) a point-code to hard-coded value\" "Override Source Point Code\" "Override Destination Point Code\" "New Point Code\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (as_pc_patch_sccp, as_pc_patch_sccp_cmd, "point-code override patch-sccp (disabled|both)", "Point Code Specific Features\ "Override(force) a point-code to hard-coded value\" "Patch point code values into SCCP called/calling address\" "Don 't patch any point codes into SCCP called/calling address\" "Patch both origin and destination point codes into SCCP called/calling address\", CMD_ATTR_IMMEDIATE)
 
static void write_one_as (struct vty *vty, struct osmo_ss7_as *as, bool show_dyn_config)
 
 DEFUN (show_cs7_as, show_cs7_as_cmd, "show cs7 instance <0-15> as (active|all|m3ua|sua)", SHOW_STR CS7_STR INST_STR INST_STR "Application Server (AS)\ "Display all active ASs\" "Display all ASs(default)\" "Display all m3ua ASs\" "Display all SUA ASs\")
 
 LLIST_HEAD (sccp_address_book_global)
 
static struct osmo_sccp_addr_entryaddr_entry_by_name_local (const char *name, const struct osmo_ss7_instance *inst)
 
static struct osmo_sccp_addr_entryaddr_entry_by_name_global (const char *name)
 
struct osmo_ss7_instanceosmo_sccp_addr_by_name (struct osmo_sccp_addr *dest_addr, const char *name)
 Lookup an SCCP address from the addressbook by its name. More...
 
int osmo_sccp_addr_by_name_local (struct osmo_sccp_addr *dest_addr, const char *name, const struct osmo_ss7_instance *inst)
 Lookup an SCCP address from the addressbook of a specific instance by its name. More...
 
const char * osmo_sccp_name_by_addr (const struct osmo_sccp_addr *addr)
 Reverse lookup the lookup-name of a specified SCCP address. More...
 
static void write_sccp_addressbook (struct vty *vty, const struct osmo_ss7_instance *inst)
 
 DEFUN (cs7_show_sccpaddr, cs7_show_sccpaddr_cmd, "show cs7 instance <0-15> sccp addressbook", SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "List all SCCP addressbook entries\)
 
 DEFUN_ATTR (cs7_sccpaddr, cs7_sccpaddr_cmd, "sccp-address NAME", "Create/Modify an SCCP addressbook entry\ "Name of the SCCP Address\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_del, cs7_sccpaddr_del_cmd, "no sccp-address NAME", NO_STR "Delete an SCCP addressbook entry\ "Name of the SCCP Address\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_ri, cs7_sccpaddr_ri_cmd, "routing-indicator (GT|PC|IP)", "Add Routing Indicator\ "by global-title\" "by point-code\" "by ip-address\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_pc, cs7_sccpaddr_pc_cmd, "point-code POINT_CODE", "Add point-code Number\ "PC\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_pc_del, cs7_sccpaddr_pc_del_cmd, "no point-code", NO_STR "Remove point-code Number\, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_ssn, cs7_sccpaddr_ssn_cmd, "subsystem-number <0-4294967295>", "Add Subsystem Number\ "SSN\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_ssn_del, cs7_sccpaddr_ssn_del_cmd, "no subsystem-number", NO_STR "Remove Subsystem Number\, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt, cs7_sccpaddr_gt_cmd, "global-title", "Add/Modify Global Title\, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt_del, cs7_sccpaddr_gt_del_cmd, "no global-title", NO_STR "Remove Global Title\, CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt_gti, cs7_sccpaddr_gt_gti_cmd, "global-title-indicator <0-15>", "Set Global Title Indicator\ "GTI\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt_tt, cs7_sccpaddr_gt_tt_cmd, "translation-type <0-255>", "Set Global Title Translation Type\ "TT\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt_npi, cs7_sccpaddr_gt_npi_cmd, "numbering-plan-indicator <0-15>", "Set Global Title Numbering Plan Indicator\ "NPI\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt_nai, cs7_sccpaddr_gt_nai_cmd, "nature-of-address-indicator <0-127>", "Set Global Title Nature of Address Indicator\ "NAI\", CMD_ATTR_IMMEDIATE)
 
 DEFUN_ATTR (cs7_sccpaddr_gt_digits, cs7_sccpaddr_gt_digits_cmd, "digits DIGITS", "Set Global Title Digits\ "Number digits\", CMD_ATTR_IMMEDIATE)
 
int osmo_ss7_vty_go_parent (struct vty *vty)
 
int osmo_ss7_is_config_node (struct vty *vty, int node)
 
static void vty_init_addr (void)
 
static void vty_init_shared (void *ctx)
 
void osmo_ss7_vty_init_asp (void *ctx)
 
void osmo_ss7_vty_init_sg (void *ctx)
 

Variables

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 []
 
enum cs7_role_t __attribute__
 
static enum cs7_role_t cs7_role
 
static void * g_ctx
 
static struct cmd_node cs7_node
 
static const struct value_string ss7_network_indicator_vals []
 
static struct cmd_node rtable_node
 
static const struct value_string ipproto_vals []
 
static struct cmd_node xua_node
 
static struct cmd_node asp_node
 
static struct cmd_node as_node
 
const struct value_string mtp_si_vals []
 
static struct cmd_node sccpaddr_node
 
static struct cmd_node sccpaddr_gt_node
 

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)"

◆ IPPROTO_VAR_HELP_STR

#define IPPROTO_VAR_HELP_STR
Value:
"SCTP (Stream Control Transmission Protocol)\n" \
"TCP (Transmission Control Protocol)\n"

Referenced by DEFUN_ATTR().

◆ IPPROTO_VAR_STR

#define IPPROTO_VAR_STR   "(sctp|tcp)"

Referenced by DEFUN_ATTR().

◆ ROUTING_KEY_CMD

#define ROUTING_KEY_CMD   "routing-key RCONTEXT DPC"

◆ ROUTING_KEY_CMD_STRS

#define ROUTING_KEY_CMD_STRS
Value:
"Define a routing key\n" \
"Routing context number\n" \
"Destination Point Code\n"

◆ ROUTING_KEY_SI_ARG

#define ROUTING_KEY_SI_ARG   " si (aal2|bicc|b-isup|h248|isup|sat-isup|sccp|tup)"

◆ ROUTING_KEY_SI_ARG_STRS

#define ROUTING_KEY_SI_ARG_STRS
Value:
"Match on Service Indicator\n" \
"ATM Adaption Layer 2\n" \
"Bearer Independent Call Control\n" \
"Broadband ISDN User Part\n" \
"H.248\n" \
"ISDN User Part\n" \
"Sattelite ISDN User Part\n" \
"Signalling Connection Control Part\n" \
"Telephony User Part\n"

◆ ROUTING_KEY_SSN_ARG

#define ROUTING_KEY_SSN_ARG   " ssn SSN"

◆ ROUTING_KEY_SSN_ARG_STRS

#define ROUTING_KEY_SSN_ARG_STRS
Value:
"Match on Sub-System Number\n" \
"Sub-System Number to match on\n"

◆ SHOW_CS7_XUA_CMD

#define SHOW_CS7_XUA_CMD   "show cs7 " XUA_VAR_STR

◆ SHOW_CS7_XUA_CMD_HELP

#define SHOW_CS7_XUA_CMD_HELP   SHOW_STR CS7_STR XUA_VAR_HELP_STR

◆ XUA_SRV_SCTP_PARAM_INIT_DESC

#define XUA_SRV_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"

◆ XUA_SRV_SCTP_PARAM_INIT_FIELDS

#define XUA_SRV_SCTP_PARAM_INIT_FIELDS   "(num-ostreams|max-instreams)"

◆ XUA_VAR_HELP_STR

#define XUA_VAR_HELP_STR
Value:
"SCCP User Adaptation\n" \
"MTP3 User Adaptation\n" \
"IPA Multiplex (SCCP Lite)\n"

Referenced by DEFUN_ATTR().

◆ XUA_VAR_STR

#define XUA_VAR_STR   "(sua|m3ua|ipa)"

Referenced by DEFUN_ATTR().

Enumeration Type Documentation

◆ cs7_role_t

enum cs7_role_t
Enumerator
CS7_ROLE_SG 
CS7_ROLE_ASP 

Function Documentation

◆ _rout_key()

◆ _show_cs7_xua()

◆ addr_entry_by_name_global()

static struct osmo_sccp_addr_entry* addr_entry_by_name_global ( const char *  name)
static

◆ addr_entry_by_name_local()

static struct osmo_sccp_addr_entry* addr_entry_by_name_local ( const char *  name,
const struct osmo_ss7_instance inst 
)
static

◆ ALIAS_ATTR() [1/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\Name of ASP\ "Remote port number\" "Local port number\" XUA_VAR_HELP_STR  IPPROTO_VAR_HELP_STR,
CMD_ATTR_NODE_EXIT   
)

Referenced by DEFUN_ATTR().

◆ ALIAS_ATTR() [2/2]

ALIAS_ATTR ( asp_transport_role  ,
asp_sctp_role_cmd  ,
"sctp-role (client|server)"  ,
"Specify the SCTP role for this ASP\Operate as SCTP client;connect to a server\ "Operate as SCTP server;wait for client connections\"  ,
CMD_ATTR_HIDDEN|  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

◆ config_write_cs7()

static int config_write_cs7 ( struct vty *  vty)
static

References write_all_cs7().

Referenced by vty_init_shared().

◆ DEFUN() [1/14]

DEFUN ( show_cs7_user  ,
show_cs7_user_cmd  ,
"show cs7 instance <0-15> users"  ,
SHOW_STR CS7_STR INST_STR INST_STR "User Table\   
)

◆ DEFUN() [2/14]

DEFUN ( show_cs7_route  ,
show_cs7_route_cmd  ,
"show cs7 instance <0-15> route"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Routing Table\   
)

◆ DEFUN() [3/14]

DEFUN ( show_cs7_xua  ,
show_cs7_xua_cmd  ,
SHOW_CS7_XUA_CMD " "  [< 0-65534 >],
SHOW_CS7_XUA_CMD_HELP "Local Port Number\   
)

◆ DEFUN() [4/14]

DEFUN ( show_cs7_xua_trans_proto  ,
show_cs7_xua_trans_proto_cmd  ,
SHOW_CS7_XUA_CMD " " IPPROTO_VAR_STR " "  [< 0-65534 >],
SHOW_CS7_XUA_CMD_HELP IPPROTO_VAR_HELP_STR "Local Port Number\   
)

◆ DEFUN() [5/14]

DEFUN ( show_cs7_config  ,
show_cs7_config_cmd  ,
"show cs7 config"  ,
SHOW_STR CS7_STR "Currently running cs7 configuration"   
)

References write_all_cs7().

◆ DEFUN() [6/14]

DEFUN ( cs7_asp_disconnect  ,
cs7_asp_disconnect_cmd  ,
"cs7 instance <0-15> asp NAME disconnect"  ,
CS7_STR "Instance related commands\ "SS7 Instance Number\" "ASP related commands\" "Name of ASP\" "Disconnect the ASP(client will reconnect)\"   
)

◆ DEFUN() [7/14]

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)\   
)

References show_asp().

◆ DEFUN() [8/14]

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)\ "Lookup ASP with a given name\" "Name of the Application Server Process(ASP)\"   
)

References show_asp().

◆ DEFUN() [9/14]

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\   
)

References show_asp_remaddr().

◆ DEFUN() [10/14]

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\ "Lookup ASP with a given name\" "Name of the Application Server Process(ASP)\"   
)

References show_asp_remaddr().

◆ DEFUN() [11/14]

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\   
)

◆ DEFUN() [12/14]

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\ "Lookup ASP with a given name\" "Name of the Application Server Process(ASP)\"   
)

◆ DEFUN() [13/14]

DEFUN ( show_cs7_as  ,
show_cs7_as_cmd  ,
"show cs7 instance <0-15> as (active|all|m3ua|sua)"  ,
SHOW_STR CS7_STR INST_STR INST_STR "Application Server (AS)\ "Display all active ASs\" "Display all ASs(default)\" "Display all m3ua ASs\" "Display all SUA ASs\"   
)

◆ DEFUN() [14/14]

◆ DEFUN_ATTR() [1/59]

DEFUN_ATTR ( cs7_instance  ,
cs7_instance_cmd  ,
"cs7 instance <0-15>"  ,
CS7_STR "Configure a SS7 Instance\ INST_STR "Number of the instance\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [2/59]

DEFUN_ATTR ( cs7_net_ind  ,
cs7_net_ind_cmd  ,
"network-indicator (international | national | reserved | spare)"  ,
"Configure the Network Indicator\ "International Network\" "National Network\" "Reserved Network\" "Spare Network\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [3/59]

DEFUN_ATTR ( cs7_pc_format  ,
cs7_pc_format_cmd  ,
"point-code format <1-24> "  [< 1-23 >][< 1-22 >],
PC_STR "Configure Point Code Format\ "Length of first PC component\" "Length of second PC component\" "Length of third PC component\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [4/59]

DEFUN_ATTR ( cs7_pc_format_def  ,
cs7_pc_format_def_cmd  ,
"point-code format default"  ,
PC_STR "Configure Point Code Format\ "Default Point Code Format(3.8.3)\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [5/59]

DEFUN_ATTR ( cs7_pc_delimiter  ,
cs7_pc_delimiter_cmd  ,
"point-code delimiter (default|dash)"  ,
PC_STR "Configure Point Code Delimiter\ "Use dot as delimiter\" "User dash as delimiter\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [6/59]

DEFUN_ATTR ( cs7_point_code  ,
cs7_point_code_cmd  ,
"point-code POINT_CODE"  ,
"Configure the local Point Code\ "Point Code\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [7/59]

DEFUN_ATTR ( cs7_permit_dyn_rkm  ,
cs7_permit_dyn_rkm_cmd  ,
"xua rkm routing-key-allocation (static-only|dynamic-permitted)"  ,
"SIGTRAN xxxUA related\ "Routing Key Management\" "Routing Key Management Allocation Policy\" "Only static(pre-configured) Routing Keys permitted\" "Dynamically allocate Routing Keys for what ASPs request\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [8/59]

DEFUN_ATTR ( cs7_route_table  ,
cs7_route_table_cmd  ,
"route-table system"  ,
"Specify the name of the route table\ "Name of the route table\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [9/59]

DEFUN_ATTR ( cs7_rt_upd  ,
cs7_rt_upd_cmd  ,
"update route POINT_CODE MASK linkset LS_NAME "  [priority PRIO][qos-class(CLASS|default)],
"Update the Route\ "Update the Route\" "Destination Point Code\" "Point Code Mask\" "Point Code Length\" "Specify Destination Linkset\" "Linkset Name\" "Specify Priority\" "Priority\" "Specify QoS Class\" "QoS Class\" "Default QoS Class\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [10/59]

DEFUN_ATTR ( cs7_rt_rem  ,
cs7_rt_rem_cmd  ,
"remove route POINT_CODE MASK"  ,
"Remove a Route\ "Remove a Route\" "Destination Point Code\" "Point Code Mask\" "Point Code Length\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [11/59]

DEFUN_ATTR ( cs7_xua  ,
cs7_xua_cmd  ,
"listen " XUA_VAR_STR " <0-65534> "  [" IPPROTO_VAR_STR "],
"Configure/Enable xUA Listener\ XUA_VAR_HELP_STR "Port number\"  IPPROTO_VAR_HELP_STR,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [12/59]

DEFUN_ATTR ( no_cs7_xua  ,
no_cs7_xua_cmd  ,
"no listen " XUA_VAR_STR " <0-65534> "  [" IPPROTO_VAR_STR "],
NO_STR "Disable xUA Listener on given port\ XUA_VAR_HELP_STR "Port number\"  IPPROTO_VAR_HELP_STR,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [13/59]

DEFUN_ATTR ( xua_local_ip  ,
xua_local_ip_cmd  ,
"local-ip "  VTY_IPV46_CMD,
"Configure the Local IP Address for xUA\ "IPv4 Address to use for XUA\" "IPv6 Address to use for XUA\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [14/59]

DEFUN_ATTR ( xua_no_local_ip  ,
xua_no_local_ip_cmd  ,
"no local-ip "  VTY_IPV46_CMD,
NO_STR "Configure the Local IP Address for xUA\ "IPv4 Address to use for XUA\" "IPv6 Address to use for XUA\"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [15/59]

DEFUN_ATTR ( xua_accept_dyn_asp  ,
xua_accept_dyn_asp_cmd  ,
"accept-asp-connections (pre-configured|dynamic-permitted)"  ,
"Define what kind of ASP connections to accept\ "Accept only pre-configured ASPs(source IP/port)\" "Accept any connection and dynamically create an ASP definition\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [16/59]

DEFUN_ATTR ( xua_sctp_param_init  ,
xua_sctp_param_init_cmd  ,
"sctp-param init " XUA_SRV_SCTP_PARAM_INIT_FIELDS " <0-65535>"  ,
XUA_SRV_SCTP_PARAM_INIT_DESC "Value of the parameter\  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [17/59]

DEFUN_ATTR ( xua_no_sctp_param_init  ,
xua_no_sctp_param_init_cmd  ,
"no sctp-param init "  XUA_SRV_SCTP_PARAM_INIT_FIELDS,
NO_STR  XUA_SRV_SCTP_PARAM_INIT_DESC,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [18/59]

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

◆ DEFUN_ATTR() [19/59]

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

◆ DEFUN_ATTR() [20/59]

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

◆ DEFUN_ATTR() [21/59]

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\ "Local IPv4 Address from which to contact of ASP\" "Local IPv6 Address from which to contact of ASP\"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [22/59]

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

◆ DEFUN_ATTR() [23/59]

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\ "Remote IPv4 Address of ASP\" "Remote IPv6 Address of ASP\"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [24/59]

DEFUN_ATTR ( asp_qos_clas  ,
asp_qos_class_cmd  ,
"qos-class <0-255>"  ,
"Specify QoS Class of ASP\ "QoS Class of ASP\"  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [25/59]

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

◆ DEFUN_ATTR() [26/59]

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

◆ DEFUN_ATTR() [27/59]

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\  ,
CMD_ATTR_NODE_EXIT   
)

◆ DEFUN_ATTR() [28/59]

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() [29/59]

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() [30/59]

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

◆ DEFUN_ATTR() [31/59]

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

◆ DEFUN_ATTR() [32/59]

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

◆ DEFUN_ATTR() [33/59]

DEFUN_ATTR ( asp_timer  ,
asp_timer_cmd  ,
NULL  ,
NULL  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [34/59]

DEFUN_ATTR ( cs7_as  ,
cs7_as_cmd  ,
"as NAME "  XUA_VAR_STR,
"Configure an Application Server\ "Name of the Application Server\"  XUA_VAR_HELP_STR,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [35/59]

DEFUN_ATTR ( no_cs7_as  ,
no_cs7_as_cmd  ,
"no as NAME"  ,
NO_STR "Disable Application Server\ "Name of AS\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [36/59]

DEFUN_ATTR ( as_asp  ,
as_asp_cmd  ,
"asp NAME"  ,
"Specify that a given ASP is part of this AS\ "Name of ASP to be added to AS\"  ,
CMD_ATTR_IMMEDIATE   
)

References osmo_ss7_as_add_asp().

◆ DEFUN_ATTR() [37/59]

DEFUN_ATTR ( as_no_asp  ,
as_no_asp_cmd  ,
"no asp NAME"  ,
NO_STR "Specify ASP to be removed from this AS\ "Name of ASP to be removed\"  ,
CMD_ATTR_IMMEDIATE   
)

References osmo_ss7_as_del_asp().

◆ DEFUN_ATTR() [38/59]

DEFUN_ATTR ( as_recov_tout  ,
as_recov_tout_cmd  ,
"recovery-timeout <1-2000>"  ,
"Specifies the recovery timeout value in milliseconds\ "Recovery Timeout in Milliseconds\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [39/59]

DEFUN_ATTR ( as_qos_clas  ,
as_qos_class_cmd  ,
"qos-class <0-255>"  ,
"Specity QoS Class of AS\ "QoS Class of AS\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [40/59]

DEFUN_ATTR ( as_rout_key  ,
as_rout_key_cmd  ,
ROUTING_KEY_CMD  ,
ROUTING_KEY_CMD_STRS  ,
CMD_ATTR_IMMEDIATE   
)

References _rout_key().

◆ DEFUN_ATTR() [41/59]

DEFUN_ATTR ( as_rout_key_si  ,
as_rout_key_si_cmd  ,
ROUTING_KEY_CMD  ROUTING_KEY_SI_ARG,
ROUTING_KEY_CMD_STRS  ROUTING_KEY_SI_ARG_STRS,
CMD_ATTR_IMMEDIATE   
)

References _rout_key().

◆ DEFUN_ATTR() [42/59]

DEFUN_ATTR ( as_rout_key_ssn  ,
as_rout_key_ssn_cmd  ,
ROUTING_KEY_CMD  ROUTING_KEY_SSN_ARG,
ROUTING_KEY_CMD_STRS  ROUTING_KEY_SSN_ARG_STRS,
CMD_ATTR_IMMEDIATE   
)

References _rout_key().

◆ DEFUN_ATTR() [43/59]

DEFUN_ATTR ( as_rout_key_si_ssn  ,
as_rout_key_si_ssn_cmd  ,
ROUTING_KEY_CMD ROUTING_KEY_SI_ARG  ROUTING_KEY_SSN_ARG,
ROUTING_KEY_CMD_STRS ROUTING_KEY_SI_ARG_STRS  ROUTING_KEY_SSN_ARG_STRS,
CMD_ATTR_IMMEDIATE   
)

References _rout_key().

◆ DEFUN_ATTR() [44/59]

DEFUN_ATTR ( as_pc_override  ,
as_pc_override_cmd  ,
"point-code override dpc PC"  ,
"Point Code Specific Features\ "Override(force) a point-code to hard-coded value\" "Override Source Point Code\" "Override Destination Point Code\" "New Point Code\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [45/59]

DEFUN_ATTR ( as_pc_patch_sccp  ,
as_pc_patch_sccp_cmd  ,
"point-code override patch-sccp (disabled|both)"  ,
"Point Code Specific Features\ "Override(force) a point-code to hard-coded value\" "Patch point code values into SCCP called/calling address\" "Don 't patch any point codes into SCCP called/calling address\" "Patch both origin and destination point codes into SCCP called/calling address\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [46/59]

DEFUN_ATTR ( cs7_sccpaddr  ,
cs7_sccpaddr_cmd  ,
"sccp-address NAME"  ,
"Create/Modify an SCCP addressbook entry\ "Name of the SCCP Address\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [47/59]

DEFUN_ATTR ( cs7_sccpaddr_del  ,
cs7_sccpaddr_del_cmd  ,
"no sccp-address NAME"  ,
NO_STR "Delete an SCCP addressbook entry\ "Name of the SCCP Address\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [48/59]

DEFUN_ATTR ( cs7_sccpaddr_ri  ,
cs7_sccpaddr_ri_cmd  ,
"routing-indicator (GT|PC|IP)"  ,
"Add Routing Indicator\ "by global-title\" "by point-code\" "by ip-address\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [49/59]

DEFUN_ATTR ( cs7_sccpaddr_pc  ,
cs7_sccpaddr_pc_cmd  ,
"point-code POINT_CODE"  ,
"Add point-code Number\ "PC\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [50/59]

DEFUN_ATTR ( cs7_sccpaddr_pc_del  ,
cs7_sccpaddr_pc_del_cmd  ,
"no point-code"  ,
NO_STR "Remove point-code Number\  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [51/59]

DEFUN_ATTR ( cs7_sccpaddr_ssn  ,
cs7_sccpaddr_ssn_cmd  ,
"subsystem-number <0-4294967295>"  ,
"Add Subsystem Number\ "SSN\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [52/59]

DEFUN_ATTR ( cs7_sccpaddr_ssn_del  ,
cs7_sccpaddr_ssn_del_cmd  ,
"no subsystem-number"  ,
NO_STR "Remove Subsystem Number\  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [53/59]

DEFUN_ATTR ( cs7_sccpaddr_gt  ,
cs7_sccpaddr_gt_cmd  ,
"global-title"  ,
"Add/Modify Global Title\  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [54/59]

DEFUN_ATTR ( cs7_sccpaddr_gt_del  ,
cs7_sccpaddr_gt_del_cmd  ,
"no global-title"  ,
NO_STR "Remove Global Title\  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [55/59]

DEFUN_ATTR ( cs7_sccpaddr_gt_gti  ,
cs7_sccpaddr_gt_gti_cmd  ,
"global-title-indicator <0-15>"  ,
"Set Global Title Indicator\ "GTI\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [56/59]

DEFUN_ATTR ( cs7_sccpaddr_gt_tt  ,
cs7_sccpaddr_gt_tt_cmd  ,
"translation-type <0-255>"  ,
"Set Global Title Translation Type\ "TT\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [57/59]

DEFUN_ATTR ( cs7_sccpaddr_gt_npi  ,
cs7_sccpaddr_gt_npi_cmd  ,
"numbering-plan-indicator <0-15>"  ,
"Set Global Title Numbering Plan Indicator\ "NPI\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [58/59]

DEFUN_ATTR ( cs7_sccpaddr_gt_nai  ,
cs7_sccpaddr_gt_nai_cmd  ,
"nature-of-address-indicator <0-127>"  ,
"Set Global Title Nature of Address Indicator\ "NAI\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_ATTR() [59/59]

DEFUN_ATTR ( cs7_sccpaddr_gt_digits  ,
cs7_sccpaddr_gt_digits_cmd  ,
"digits DIGITS"  ,
"Set Global Title Digits\ "Number digits\"  ,
CMD_ATTR_IMMEDIATE   
)

◆ DEFUN_USRATTR() [1/2]

DEFUN_USRATTR ( as_traf_mode  ,
as_traf_mode_cmd  ,
OSMO_SCCP_LIB_ATTR_RSTRT_ASP  ,
"traffic-mode (broadcast | loadshare | roundrobin | override)"  ,
"Specifies traffic mode of operation of the ASP within the AS\ "Broadcast to all ASP within AS\" "Share Load among all ASP within AS\" "Round-Robin between all ASP within AS\" "Override\"   
)

◆ DEFUN_USRATTR() [2/2]

DEFUN_USRATTR ( as_no_traf_mode  ,
as_no_traf_mode_cmd  ,
OSMO_SCCP_LIB_ATTR_RSTRT_ASP  ,
"no traffic-mode"  ,
NO_STR "Remove explicit traffic mode of operation of this AS\   
)

◆ gen_asp_timer_cmd_strs()

static void gen_asp_timer_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

Referenced by show_one_asp().

◆ LLIST_HEAD()

LLIST_HEAD ( sccp_address_book_global  )

◆ osmo_sccp_addr_by_name()

struct osmo_ss7_instance* osmo_sccp_addr_by_name ( struct osmo_sccp_addr dest_addr,
const char *  name 
)

Lookup an SCCP address from the addressbook by its name.

Parameters
[out]dest_addrpointer to output the resulting sccp-address; (set to NULL if not interested)
[in]nameof the address to lookup
Returns
SS7 instance; NULL on error

References osmo_sccp_addr_entry::addr, addr_entry_by_name_global(), and osmo_sccp_addr_entry::inst.

Referenced by osmo_scu_prim_type_name().

◆ osmo_sccp_addr_by_name_local()

int osmo_sccp_addr_by_name_local ( struct osmo_sccp_addr dest_addr,
const char *  name,
const struct osmo_ss7_instance inst 
)

Lookup an SCCP address from the addressbook of a specific instance by its name.

Parameters
[out]dest_addrpointer to output the resulting sccp-address; (set to NULL if not interested)
[in]nameof the address to lookup
[in]instss7 instance of which the address book will be searched
Returns
0 on success; <0 on error

References osmo_sccp_addr_entry::addr, and addr_entry_by_name_local().

Referenced by osmo_scu_prim_type_name().

◆ osmo_sccp_name_by_addr()

const char* osmo_sccp_name_by_addr ( const struct osmo_sccp_addr addr)

Reverse lookup the lookup-name of a specified SCCP address.

Parameters
[in]nameof the address to lookup
Returns
char pointer to the lookup-name; NULL on error

References osmo_sccp_addr_entry::addr, osmo_sccp_addr_entry::list_global, and osmo_sccp_addr_entry::name.

Referenced by osmo_scu_prim_type_name().

◆ osmo_ss7_is_config_node()

int osmo_ss7_is_config_node ( struct vty *  vty,
int  node 
)

◆ osmo_ss7_vty_go_parent()

◆ osmo_ss7_vty_init_asp()

void osmo_ss7_vty_init_asp ( void *  ctx)

◆ osmo_ss7_vty_init_sg()

void osmo_ss7_vty_init_sg ( void *  ctx)

◆ parse_asp_proto()

static enum osmo_ss7_asp_protocol parse_asp_proto ( const char *  protocol)
static

References osmo_ss7_asp_protocol_vals.

Referenced by DEFUN(), and DEFUN_ATTR().

◆ parse_trans_proto()

static int parse_trans_proto ( const char *  protocol)
static

References ipproto_vals.

Referenced by DEFUN(), and DEFUN_ATTR().

◆ 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

◆ vty_dump_rtable()

◆ vty_dump_xua_server()

◆ vty_init_addr()

static void vty_init_addr ( void  )
static

References sccpaddr_gt_node, and sccpaddr_node.

Referenced by vty_init_shared().

◆ vty_init_shared()

static void vty_init_shared ( void *  ctx)
static

◆ write_all_cs7()

static int write_all_cs7 ( struct vty *  vty,
bool  show_dyn_config 
)
static

◆ write_asp_timers()

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

◆ write_one_as()

◆ write_one_asp()

◆ write_one_cs7()

◆ write_one_rtable()

◆ write_one_xua()

◆ write_sccp_addressbook()

Variable Documentation

◆ __attribute__

enum cs7_role_t __attribute__

◆ as_node

struct cmd_node as_node
static
Initial value:
= {
L_CS7_AS_NODE,
"%s(config-cs7-as)# ",
1,
}

Referenced by vty_init_shared().

◆ asp_node

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

Referenced by vty_init_shared().

◆ 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_DAUD_IN_ASP
Accept DAUD in ASP role (RFC states only permitted in ASP->SG role)
Definition: osmo_ss7.h:465
#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE
Accept SSNM even if ASP is in AS-INACTIVE state.
Definition: osmo_ss7.h:467
#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY
Peer SG doesn&#39;t send NTFY(AS-INACTIVE) after ASP-UP procedure.
Definition: osmo_ss7.h:463

Referenced by vty_init_shared().

◆ 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 }
}
#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:465
#define OSMO_SS7_ASP_QUIRK_SNM_INACTIVE
Accept SSNM even if ASP is in AS-INACTIVE state.
Definition: osmo_ss7.h:467
#define OSMO_SS7_ASP_QUIRK_NO_NOTIFY
Peer SG doesn&#39;t send NTFY(AS-INACTIVE) after ASP-UP procedure.
Definition: osmo_ss7.h:463

Referenced by DEFUN_ATTR(), vty_init_shared(), and write_one_asp().

◆ cs7_node

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

Referenced by vty_init_shared().

◆ cs7_role

◆ g_ctx

void* g_ctx
static

Referenced by DEFUN_ATTR(), and vty_init_shared().

◆ ipproto_vals

const struct value_string ipproto_vals[]
static
Initial value:
= {
{ IPPROTO_SCTP, "sctp" },
{ IPPROTO_TCP, "tcp" },
{ 0, NULL },
}

Referenced by parse_trans_proto(), vty_dump_xua_server(), write_one_asp(), and write_one_xua().

◆ mtp_si_vals

const struct value_string mtp_si_vals[]
Initial value:
= {
{ MTP_SI_SCCP, "sccp" },
{ MTP_SI_TUP, "tup" },
{ MTP_SI_ISUP, "isup" },
{ MTP_SI_DUP, "dup" },
{ MTP_SI_TESTING, "testing" },
{ MTP_SI_B_ISUP, "b-isup" },
{ MTP_SI_SAT_ISUP, "sat-isup" },
{ MTP_SI_AAL2_SIG, "aal2" },
{ MTP_SI_BICC, "bicc" },
{ MTP_SI_GCP, "h248" },
{ 0, NULL }
}
Definition: mtp.h:12
Definition: mtp.h:17
Definition: mtp.h:21
Definition: mtp.h:13
Definition: mtp.h:11
Definition: mtp.h:20
Definition: mtp.h:16
Definition: mtp.h:15
Definition: mtp.h:10
Definition: mtp.h:19

Referenced by _rout_key(), write_one_as(), and xua_snm_rx_dupu().

◆ rtable_node

struct cmd_node rtable_node
static
Initial value:
= {
L_CS7_RTABLE_NODE,
"%s(config-cs7-rt)# ",
1,
}

Referenced by osmo_ss7_vty_init_sg().

◆ sccpaddr_gt_node

struct cmd_node sccpaddr_gt_node
static
Initial value:
= {
L_CS7_SCCPADDR_GT_NODE,
"%s(config-cs7-sccpaddr-gt)# ",
1,
}

Referenced by vty_init_addr().

◆ sccpaddr_node

struct cmd_node sccpaddr_node
static
Initial value:
= {
L_CS7_SCCPADDR_NODE,
"%s(config-cs7-sccpaddr)# ",
1,
}

Referenced by vty_init_addr().

◆ ss7_network_indicator_vals

const struct value_string ss7_network_indicator_vals[]
static
Initial value:
= {
{ 0, "international" },
{ 1, "spare" },
{ 2, "national" },
{ 3, "reserved" },
{ 0, NULL }
}

Referenced by DEFUN_ATTR(), and write_one_cs7().

◆ 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().

◆ xua_node

struct cmd_node xua_node
static
Initial value:
= {
L_CS7_XUA_NODE,
"%s(config-cs7-listen)# ",
1,
}

Referenced by osmo_ss7_vty_init_sg().