libosmo-sigtran 2.2.1.4-74d0 Osmocom SIGTRAN library

Macros | Functions | Variables
ss7_xua_srv_vty.c File Reference
`#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/netif/stream.h>`
`#include <osmocom/sigtran/osmo_ss7.h>`
`#include "xua_internal.h"`
`#include "ss7_asp.h"`
`#include "ss7_internal.h"`
`#include "ss7_vty.h"`
`#include "ss7_xua_srv.h"`

## Macros
#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

## Functions
| DEFUN_ATTR (cs7_xua, cs7_xua_cmd, "listen " XUA_VAR_STR " <0-65534> [" IPPROTO_VAR_STR "]", "Configure/Enable xUA Listener\n" XUA_VAR_HELP_STR "Port number\n" 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\n" XUA_VAR_HELP_STR "Port number\n" 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\n" "IPv4 Address to use for XUA\n" "IPv6 Address to use for XUA\n", 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\n" "IPv4 Address to use for XUA\n" "IPv6 Address to use for XUA\n", 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\n" "Accept only pre-configured ASPs (source IP/port)\n" "Accept any connection and dynamically create an ASP definition\n", 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\n", 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)
void | ss7_vty_write_one_oxs (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\n")
| 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\n")
int | ss7_vty_node_oxs_go_parent (struct vty *vty)
void | ss7_vty_init_show_oxs (void)
void | ss7_vty_init_node_oxs (void)

## Variables
static struct cmd_node | xua_node

## Macro Definition Documentation

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

## Function Documentation

## ◆ _show_cs7_xua()

static int _show_cs7_xua | ( | struct vty * | vty,
|  | enum osmo_ss7_asp_protocol | proto,
|  | int | trans_proto,
|  | int | local_port
| ) |  |
| static

References osmo_xua_server::cfg, osmo_xua_server::inst, osmo_ss7_instance::list, osmo_xua_server::list, osmo_xua_server::local, osmo_ss7_instances, osmo_ss7_asp_peer::port, osmo_xua_server::proto, osmo_xua_server::trans_proto, vty_dump_xua_server(), and osmo_ss7_instance::xua_servers.

Referenced by DEFUN().

## ◆ DEFUN() [1/2]

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

References _show_cs7_xua(), parse_asp_proto(), and osmo_xua_server::proto.

## ◆ DEFUN() [2/2]

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

References _show_cs7_xua(), parse_asp_proto(), parse_trans_proto(), osmo_xua_server::proto, and osmo_xua_server::trans_proto.

## ◆ DEFUN_ATTR() [1/7]

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

References osmo_xua_server::inst, NULL, parse_asp_proto(), parse_trans_proto(), osmo_xua_server::proto, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_create2(), ss7_xua_server_find2(), ss7_xua_server_set_local_hosts(), and osmo_xua_server::trans_proto.

## ◆ DEFUN_ATTR() [2/7]

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\n" XUA_VAR_HELP_STR "Port number\n" | IPPROTO_VAR_HELP_STR,
|  | CMD_ATTR_IMMEDIATE |
| ) |  |

References osmo_xua_server::inst, parse_asp_proto(), parse_trans_proto(), osmo_xua_server::proto, ss7_default_trans_proto_for_asp_proto(), ss7_xua_server_destroy(), ss7_xua_server_find2(), and osmo_xua_server::trans_proto.

## ◆ DEFUN_ATTR() [3/7]

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\n" "Accept only pre-configured ASPs (source IP/port)\n" "Accept any connection and dynamically create an ASP definition\n" | ,
|  | CMD_ATTR_IMMEDIATE |
| ) |  |

References osmo_xua_server::accept_dyn_reg, and osmo_xua_server::cfg.

## ◆ DEFUN_ATTR() [4/7]

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

References ss7_xua_server_add_local_host().

## ◆ DEFUN_ATTR() [5/7]

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\n" "IPv4 Address to use for XUA\n" "IPv6 Address to use for XUA\n" | ,
|  | CMD_ATTR_NODE_EXIT |
| ) |  |

References ss7_xua_server_del_local_host().

## ◆ DEFUN_ATTR() [6/7]

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

References osmo_xua_server::cfg, osmo_xua_server::max_instreams_present, osmo_xua_server::num_ostreams_present, and osmo_xua_server::sctp_init.

## ◆ DEFUN_ATTR() [7/7]

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

References osmo_xua_server::cfg, osmo_xua_server::max_instreams_present, osmo_xua_server::max_instreams_value, osmo_xua_server::num_ostreams_present, osmo_xua_server::num_ostreams_value, and osmo_xua_server::sctp_init.

## ◆ ss7_vty_init_node_oxs()

void ss7_vty_init_node_oxs | ( | void |  | ) |

References NULL, and xua_node.

Referenced by osmo_ss7_vty_init_sg().

## ◆ ss7_vty_init_show_oxs()

void ss7_vty_init_show_oxs | ( | void |  | ) |

Referenced by vty_init_shared().

## ◆ ss7_vty_node_oxs_go_parent()

int ss7_vty_node_oxs_go_parent | ( | struct vty * | vty | ) |

References osmo_xua_server::inst, ss7_xua_server_bind(), and ss7_xua_server_set_default_local_hosts().

Referenced by osmo_ss7_vty_go_parent().

## ◆ ss7_vty_write_one_oxs()

void ss7_vty_write_one_oxs | ( | struct vty * | vty,
|  | struct osmo_xua_server * | xs
| ) |  |

References osmo_xua_server::accept_dyn_reg, osmo_xua_server::cfg, osmo_ss7_asp_peer::host, osmo_ss7_asp_peer::host_cnt, ipproto_vals, osmo_xua_server::local, osmo_xua_server::max_instreams_present, osmo_xua_server::max_instreams_value, osmo_xua_server::num_ostreams_present, osmo_xua_server::num_ostreams_value, osmo_ss7_asp_protocol_vals, osmo_ss7_asp_peer::port, osmo_xua_server::proto, osmo_xua_server::sctp_init, ss7_default_trans_proto_for_asp_proto(), and osmo_xua_server::trans_proto.

Referenced by write_one_cs7().

## ◆ vty_dump_xua_server()

static void vty_dump_xua_server | ( | struct vty * | vty,
|  | struct osmo_xua_server * | xs
| ) |  |
| static

References osmo_xua_server::cfg, ipproto_vals, osmo_xua_server::local, osmo_ss7_asp_protocol_vals, osmo_xua_server::proto, osmo_xua_server::server, ss7_asp_peer_snprintf(), and osmo_xua_server::trans_proto.

Referenced by _show_cs7_xua().

## Variable Documentation

## ◆ xua_node

struct cmd_node xua_node
| static

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

Referenced by ss7_vty_init_node_oxs().