libosmo-sigtran 2.1.0.119-5f21
Osmocom SIGTRAN library
|
#include <stdlib.h>
#include <unistd.h>
#include <errno.h>
#include <stdint.h>
#include <string.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/sigtran/protocol/mtp.h>
#include "ss7_as.h"
#include "ss7_asp.h"
#include "ss7_route.h"
#include "ss7_route_table.h"
#include "ss7_internal.h"
#include "ss7_vty.h"
Macros | |
#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 |
Functions | |
DEFUN_ATTR (cs7_as, cs7_as_cmd, "as NAME " XUA_VAR_STR, "Configure an Application Server\n" "Name of the Application Server\n" XUA_VAR_HELP_STR, CMD_ATTR_IMMEDIATE) | |
DEFUN_ATTR (no_cs7_as, no_cs7_as_cmd, "no as NAME", NO_STR "Disable Application Server\n" "Name of AS\n", CMD_ATTR_IMMEDIATE) | |
DEFUN_ATTR (as_asp, as_asp_cmd, "asp NAME", "Specify that a given ASP is part of this AS\n" "Name of ASP to be added to AS\n", 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\n" "Name of ASP to be removed\n", CMD_ATTR_IMMEDIATE) | |
DEFUN_USRATTR (as_traf_mode, as_traf_mode_cmd, OSMO_SCCP_LIB_ATTR_RSTRT_ASP, "traffic-mode (broadcast | roundrobin | override)", "Specifies traffic mode of operation of the ASP within the AS\n" "Broadcast to all ASP within AS\n" "Round-Robin between all ASP within AS\n" "Override\n") | |
DEFUN_USRATTR (as_traf_mode_loadshare, as_traf_mode_loadshare_cmd, OSMO_SCCP_LIB_ATTR_RSTRT_ASP, "traffic-mode loadshare [bindings] [sls] [opc-sls] [opc-shift] [<0-2>]", "Specifies traffic mode of operation of the ASP within the AS\n" "Share Load among all ASP within AS\n" "Configure Loadshare parameters\n" "Configure Loadshare SLS generation parameters\n" "Generate extended SLS with OPC information\n" "Shift OPC bits used during routing decision\n" "How many bits from ITU OPC field (starting from least-significant-bit) to skip (default=0). 6 bits are always used\n") | |
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\n") | |
DEFUN_ATTR (as_sls_shift, as_sls_shift_cmd, "sls-shift <0-3>", "Shift SLS bits used during routing decision\n" "How many bits from SLS field (starting from least-significant-bit) to skip\n", CMD_ATTR_IMMEDIATE) | |
DEFUN_ATTR (as_bindingtable_reset, as_bindingtable_reset_cmd, "binding-table reset", "AS Loadshare binding table operations\n" "Reset loadshare binding table\n", CMD_ATTR_IMMEDIATE) | |
DEFUN_ATTR (as_recov_tout, as_recov_tout_cmd, "recovery-timeout <1-2000>", "Specifies RFC4666 recovery timer T(r) timeout\n" "Recovery Timeout in Milliseconds\n", CMD_ATTR_IMMEDIATE) | |
DEFUN_ATTR (as_qos_clas, as_qos_class_cmd, "qos-class " QOS_CLASS_RANGE_STR, "Specity QoS Class of AS\n" QOS_CLASS_RANGE_HELP_STR, 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\n" "Override (force) a point-code to hard-coded value\n" "Override Source Point Code\n" "Override Destination Point Code\n" "New Point Code\n", 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\n" "Override (force) a point-code to hard-coded value\n" "Patch point code values into SCCP called/calling address\n" "Don't patch any point codes into SCCP called/calling address\n" "Patch both origin and destination point codes into SCCP called/calling address\n", CMD_ATTR_IMMEDIATE) | |
void | ss7_vty_write_one_as (struct vty *vty, struct osmo_ss7_as *as, bool show_dyn_config) |
static void | show_one_as (struct vty *vty, struct osmo_ss7_as *as) |
static int | show_as (struct vty *vty, int id, const char *as_name, const char *filter) |
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)\n" "Display all active ASs\n" "Display all ASs (default)\n" "Display all m3ua ASs\n" "Display all SUA ASs\n") | |
DEFUN (show_cs7_as_name, show_cs7_as_name_cmd, "show cs7 instance <0-15> as name AS_NAME", SHOW_STR CS7_STR INST_STR INST_STR "Application Server (AS)\n" "Look up AS with a given name\n" "Name of the Application Server (AS)\n") | |
DEFUN (show_cs7_as_bindingtable_name, show_cs7_as_bindingtable_name_cmd, "show cs7 instance <0-15> as binding-table name AS_NAME", SHOW_STR CS7_STR INST_STR INST_STR "Application Server (AS)\n" "Display binding table\n" "Look up AS with a given name\n" "Name of the Application Server (AS)\n") | |
int | ss7_vty_node_as_go_parent (struct vty *vty) |
void | ss7_vty_init_node_as (void) |
Variables | |
static struct cmd_node | as_node |
const struct value_string | mtp_si_vals [] |
#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 |
|
static |
References osmo_ss7_route::as, osmo_ss7_as::cfg, osmo_ss7_routing_key::context, cs7_role, CS7_ROLE_ASP, dpc, osmo_ss7_as::inst, mtp_si_vals, osmo_ss7_as::name, OSMO_SS7_ASP_PROT_IPA, osmo_ss7_pointcode_parse(), osmo_ss7_routing_key::pc, osmo_ss7_route::pc, osmo_ss7_as::proto, osmo_ss7_as::routing_key, osmo_ss7_instance::rtable_system, osmo_ss7_routing_key::si, si, ss7_route_create(), ss7_route_destroy(), ss7_route_table_find_route_by_dpc_mask(), and osmo_ss7_routing_key::ssn.
Referenced by DEFUN_ATTR().
DEFUN_ATTR | ( | as_asp | , |
as_asp_cmd | , | ||
"asp NAME" | , | ||
"Specify that a given ASP is part of this AS\n" "Name of ASP to be added to AS\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
References osmo_ss7_as_add_asp().
DEFUN_ATTR | ( | as_bindingtable_reset | , |
as_bindingtable_reset_cmd | , | ||
"binding-table reset" | , | ||
"AS Loadshare binding table operations\n" "Reset loadshare binding table\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
References ss7_as_loadshare_binding_table_reset().
DEFUN_ATTR | ( | as_no_asp | , |
as_no_asp_cmd | , | ||
"no asp NAME" | , | ||
NO_STR "Specify ASP to be removed from this AS\n" "Name of ASP to be removed\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
References osmo_ss7_as_del_asp().
DEFUN_ATTR | ( | as_pc_override | , |
as_pc_override_cmd | , | ||
"point-code override dpc PC" | , | ||
"Point Code Specific Features\n" "Override (force) a point-code to hard-coded value\n" "Override Source Point Code\n" "Override Destination Point Code\n" "New Point Code\n" | , | ||
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\n" "Override (force) a point-code to hard-coded value\n" "Patch point code values into SCCP called/calling address\n" "Don't patch any point codes into SCCP called/calling address\n" "Patch both origin and destination point codes into SCCP called/calling address\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
DEFUN_ATTR | ( | as_qos_clas | , |
as_qos_class_cmd | , | ||
"qos-class " | QOS_CLASS_RANGE_STR, | ||
"Specity QoS Class of AS\n" | QOS_CLASS_RANGE_HELP_STR, | ||
CMD_ATTR_IMMEDIATE | |||
) |
References osmo_ss7_as::cfg, and osmo_ss7_as::qos_class.
DEFUN_ATTR | ( | as_recov_tout | , |
as_recov_tout_cmd | , | ||
"recovery-timeout <1-2000>" | , | ||
"Specifies RFC4666 recovery timer T(r) timeout\n" "Recovery Timeout in Milliseconds\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
References osmo_ss7_as::cfg, and osmo_ss7_as::recovery_timeout_msec.
DEFUN_ATTR | ( | as_rout_key | , |
as_rout_key_cmd | , | ||
ROUTING_KEY_CMD | , | ||
ROUTING_KEY_CMD_STRS | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
References _rout_key(), and NULL.
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(), and NULL.
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 | ( | 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(), and NULL.
DEFUN_ATTR | ( | as_sls_shift | , |
as_sls_shift_cmd | , | ||
"sls-shift <0-3>" | , | ||
"Shift SLS bits used during routing decision\n" "How many bits from SLS field (starting from least-significant-bit) to skip\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
References osmo_ss7_as::cfg, osmo_ss7_as::loadshare, and osmo_ss7_as::sls_shift.
DEFUN_ATTR | ( | cs7_as | , |
cs7_as_cmd | , | ||
"as NAME " | XUA_VAR_STR, | ||
"Configure an Application Server\n" "Name of the Application Server\n" | XUA_VAR_HELP_STR, | ||
CMD_ATTR_IMMEDIATE | |||
) |
DEFUN_ATTR | ( | no_cs7_as | , |
no_cs7_as_cmd | , | ||
"no as NAME" | , | ||
NO_STR "Disable Application Server\n" "Name of AS\n" | , | ||
CMD_ATTR_IMMEDIATE | |||
) |
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\n" | |||
) |
DEFUN_USRATTR | ( | as_traf_mode | , |
as_traf_mode_cmd | , | ||
OSMO_SCCP_LIB_ATTR_RSTRT_ASP | , | ||
"traffic-mode (broadcast | roundrobin | override)" | , | ||
"Specifies traffic mode of operation of the ASP within the AS\n" "Broadcast to all ASP within AS\n" "Round-Robin between all ASP within AS\n" "Override\n" | |||
) |
DEFUN_USRATTR | ( | as_traf_mode_loadshare | , |
as_traf_mode_loadshare_cmd | , | ||
OSMO_SCCP_LIB_ATTR_RSTRT_ASP | , | ||
"traffic-mode loadshare " | [bindings][sls][opc-sls][opc-shift][< 0-2 >], | ||
"Specifies traffic mode of operation of the ASP within the AS\n" "Share Load among all ASP within AS\n" "Configure Loadshare parameters\n" "Configure Loadshare SLS generation parameters\n" "Generate extended SLS with OPC information\n" "Shift OPC bits used during routing decision\n" "How many bits from ITU OPC field (starting from least-significant-bit) to skip (default=0). 6 bits are always used\n" | |||
) |
|
static |
|
static |
void ss7_vty_init_node_as | ( | void | ) |
Referenced by vty_init_shared().
int ss7_vty_node_as_go_parent | ( | struct vty * | vty | ) |
References osmo_ss7_as::inst.
Referenced by osmo_ss7_vty_go_parent().
void ss7_vty_write_one_as | ( | struct vty * | vty, |
struct osmo_ss7_as * | as, | ||
bool | show_dyn_config | ||
) |
References osmo_ss7_as::asps, osmo_ss7_as::cfg, osmo_ss7_asp::cfg, osmo_ss7_routing_key::context, osmo_ss7_as::description, osmo_ss7_as::dpc, osmo_ss7_asp::dyn_allocated, osmo_ss7_as::inst, osmo_ss7_as::loadshare, osmo_ss7_as::mode, osmo_ss7_as::mode_set_by_vty, mtp_si_vals, osmo_ss7_as::name, osmo_ss7_asp::name, osmo_ss7_as::opc_shift, osmo_ss7_as::opc_sls, OSMO_SS7_AS_TMOD_LOADSHARE, osmo_ss7_as_traffic_mode_name(), osmo_ss7_asp_protocol_name(), osmo_ss7_pointcode_print(), osmo_ss7_routing_key::pc, osmo_ss7_as::pc_override, osmo_ss7_as::proto, osmo_ss7_as::qos_class, osmo_ss7_as::recovery_timeout_msec, osmo_ss7_as::rkm_dyn_allocated, osmo_ss7_as::routing_key, osmo_ss7_as::sccp_mode, osmo_ss7_routing_key::si, osmo_ss7_as::simple_client_allocated, osmo_ss7_asp::simple_client_allocated, osmo_ss7_as::sls_shift, and osmo_ss7_routing_key::ssn.
Referenced by write_one_cs7().
|
static |
Referenced by ss7_vty_init_node_as().
const struct value_string mtp_si_vals[] |
Referenced by _rout_key(), ss7_vty_write_one_as(), and xua_snm_rx_dupu().