libosmo-sigtran 2.2.1.64-e866 Osmocom SIGTRAN library

Functions
sccp_vty.c File Reference
`#include <stdlib.h>`
`#include <unistd.h>`
`#include <errno.h>`
`#include <stdint.h>`
`#include <string.h>`
`#include <arpa/inet.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/osmo_ss7.h>`
`#include <osmocom/sigtran/protocol/mtp.h>`
`#include <osmocom/sccp/sccp_types.h>`
`#include "xua_internal.h"`
`#include "sccp_connection.h"`
`#include "sccp_instance.h"`
`#include "sccp_internal.h"`
`#include "sccp_user.h"`
`#include "ss7_instance.h"`
`#include "ss7_vty.h"`

## Functions
static void | vty_show_connection (struct vty *vty, struct sccp_connection *conn)
void | sccp_show_connections (struct vty *vty, struct osmo_sccp_instance *inst)
static void | show_user (struct vty *vty, struct osmo_sccp_user *user)
| DEFUN (show_sccp_users, show_sccp_users_cmd, "show cs7 instance <0-15> sccp users", SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "Show List of SCCP Users registered\n")
| DEFUN (show_sccp_user_ssn, show_sccp_user_ssn_cmd, "show cs7 instance <0-15> sccp ssn <0-65535>", SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "Find an SCCP User registered for the given SSN\n" "Subsystem Number (SSN)\n")
| DEFUN (show_sccp_connections, show_sccp_connections_cmd, "show cs7 instance <0-15> sccp connections", SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "Show List of active SCCP connections\n")
| DEFUN_ATTR (sccp_timer, sccp_timer_cmd, NULL, NULL, CMD_ATTR_IMMEDIATE)
| DEFUN_ATTR (sccp_max_optional_data, sccp_max_optional_data_cmd, "sccp max-optional-data (<0-999999>|standard)", "Configure SCCP behavior\n" "Adjust the upper bound for the optional data length (the payload) for CR, CC, CREF and RLSD messages." " For any Optional Data part larger than this value in octets, send CR, CC, CREF and RLSD" " messages without any payload, and send the data payload in a separate Data Form 1 message." " ITU-T Q.713 sections 4.2 thru 4.5 define a limit of 128 bytes for the 'Data' parameter. This limit can be" " adjusted here. May be useful for interop with nonstandard SCCP peers.\n" "Set a non-standard maximum allowed number of bytes\n" "Use the ITU-T Q.713 4.2 to 4.5 standard value of 128\n", CMD_ATTR_IMMEDIATE)
static void | gen_sccp_timer_cmd_strs (struct cmd_element *cmd)
static void | write_sccp_timers (struct vty *vty, const char *indent, struct osmo_sccp_instance *inst, bool default_if_unset)
void | osmo_sccp_vty_write_cs7_node (struct vty *vty, const char *indent, struct osmo_sccp_instance *inst)
| DEFUN (show_sccp_timers, show_sccp_timers_cmd, "show cs7 instance <0-15> sccp timers", SHOW_STR CS7_STR INST_STR INST_STR "Signaling Connection Control Part\n" "Show List of SCCP timers\n")
void | osmo_sccp_vty_init (void)

## Function Documentation

## ◆ DEFUN() [1/4]

DEFUN | ( | show_sccp_connections | ,
|  | show_sccp_connections_cmd | ,
|  | "show cs7 instance <0-15> sccp connections" | ,
|  | SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "Show List of active SCCP connections\n" |
| ) |  |

References osmo_ss7_instance_find(), osmo_ss7_instance::sccp, and sccp_show_connections().

## ◆ DEFUN() [2/4]

DEFUN | ( | show_sccp_timers | ,
|  | show_sccp_timers_cmd | ,
|  | "show cs7 instance <0-15> sccp timers" | ,
|  | SHOW_STR CS7_STR INST_STR INST_STR "Signaling Connection Control Part\n" "Show List of SCCP timers\n" |
| ) |  |

References osmo_ss7_instance_find(), osmo_ss7_instance::sccp, and write_sccp_timers().

## ◆ DEFUN() [3/4]

DEFUN | ( | show_sccp_user_ssn | ,
|  | show_sccp_user_ssn_cmd | ,
|  | "show cs7 instance <0-15> sccp ssn <0-65535>" | ,
|  | SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "Find an SCCP User registered for the given SSN\n" "Subsystem Number (SSN)\n" |
| ) |  |

References osmo_sccp_user::inst, osmo_ss7_instance_find(), sccp_user_find(), show_user(), and ssn.

## ◆ DEFUN() [4/4]

DEFUN | ( | show_sccp_users | ,
|  | show_sccp_users_cmd | ,
|  | "show cs7 instance <0-15> sccp users" | ,
|  | SHOW_STR CS7_STR INST_STR INST_STR SCCP_STR "Show List of SCCP Users registered\n" |
| ) |  |

References osmo_sccp_user::inst, osmo_sccp_user::list, osmo_ss7_instance_find(), show_user(), and osmo_sccp_instance::users.

## ◆ DEFUN_ATTR() [1/2]

DEFUN_ATTR | ( | sccp_max_optional_data | ,
|  | sccp_max_optional_data_cmd | ,
|  | "sccp max-optional-data (<0-999999>|standard)" | ,
|  | "Configure SCCP behavior\n" "Adjust the upper bound for the optional data length (the payload) for | CR,
|  | CC | ,
|  | CREF and RLSD messages." " For any Optional Data part larger than this value in | octets,
|  | send | CR,
|  | CC | ,
|  | CREF and RLSD" " messages without any | payload,
|  | and send the data payload in a separate Data Form 1 message." " ITU-T Q.713 sections 4.2 thru 4.5 define a limit of 128 bytes for the 'Data' parameter. This limit can be" " adjusted here. May be useful for interop with nonstandard SCCP peers.\n" "Set a non-standard maximum allowed number of bytes\n" "Use the ITU-T Q.713 4.2 to 4.5 standard value of 128\n" | ,
|  | CMD_ATTR_IMMEDIATE |
| ) |  |

References osmo_sccp_set_max_optional_data(), osmo_ss7_ensure_sccp(), and osmo_ss7_instance::sccp.

## ◆ DEFUN_ATTR() [2/2]

DEFUN_ATTR | ( | sccp_timer | ,
|  | sccp_timer_cmd | ,
|  | NULL | ,
|  | NULL | ,
|  | CMD_ATTR_IMMEDIATE |
| ) |  |

References osmo_sccp_timer_names, OSMO_SCCP_TIMERS_LEN, osmo_ss7_ensure_sccp(), osmo_ss7_instance::sccp, osmo_sccp_instance::tdefs, and osmo_ss7_instance::timer.

## ◆ gen_sccp_timer_cmd_strs()

static void gen_sccp_timer_cmd_strs | ( | struct cmd_element * | cmd | ) |
| static

References NULL, osmo_sccp_timer_defaults, and osmo_sccp_timer_names.

Referenced by osmo_sccp_vty_init().

## ◆ osmo_sccp_vty_init()

void osmo_sccp_vty_init | ( | void |  | ) |

References gen_sccp_timer_cmd_strs().

## ◆ osmo_sccp_vty_write_cs7_node()

void osmo_sccp_vty_write_cs7_node | ( | struct vty * | vty,
|  | const char * | indent,
|  | struct osmo_sccp_instance * | inst
| ) |  |

References osmo_sccp_instance::max_optional_data, and write_sccp_timers().

Referenced by write_one_cs7().

## ◆ sccp_show_connections()

void sccp_show_connections | ( | struct vty * | vty,
|  | struct osmo_sccp_instance * | inst
| ) |  |

References osmo_sccp_instance::connections, and vty_show_connection().

Referenced by DEFUN().

## ◆ show_user()

static void show_user | ( | struct vty * | vty,
|  | struct osmo_sccp_user * | user
| ) |  |
| static

References osmo_sccp_user::inst, osmo_sccp_user::name, osmo_ss7_pc_is_valid(), osmo_ss7_pointcode_print(), osmo_sccp_user::pc, osmo_sccp_instance::ss7, and osmo_sccp_user::ssn.

Referenced by DEFUN().

## ◆ vty_show_connection()

static void vty_show_connection | ( | struct vty * | vty,
|  | struct sccp_connection * | conn
| ) |  |
| static

References sccp_connection::called_addr, sccp_connection::calling_addr, osmo_ss7_instance::cfg, sccp_connection::conn_id, sccp_connection::fi, sccp_connection::incoming, sccp_connection::inst, OSMO_SS7_PC_INVALID, osmo_ss7_pc_is_valid(), osmo_ss7_pointcode_print(), osmo_sccp_user::pc, osmo_ss7_instance::primary_pc, sccp_connection::remote_pc, sccp_connection::remote_ref, osmo_sccp_instance::ss7, osmo_sccp_addr::ssn, osmo_sccp_user::ssn, and sccp_connection::user.

Referenced by sccp_show_connections().

## ◆ write_sccp_timers()

static void write_sccp_timers | ( | struct vty * | vty,
|  | const char * | indent,
|  | struct osmo_sccp_instance * | inst,
|  | bool | default_if_unset
| ) |  |
| static

References osmo_sccp_timer_names, and osmo_sccp_instance::tdefs.

Referenced by DEFUN(), and osmo_sccp_vty_write_cs7_node().