libosmo-sigtran 2.1.0.190-7669 Osmocom SIGTRAN library

Macros | Functions | Variables
ss7_internal.h File Reference
`#include <stdbool.h>`
`#include <stdint.h>`
`#include <osmocom/netif/stream.h>`
`#include <osmocom/sigtran/osmo_ss7.h>`
`#include "ss7_instance.h"`

Go to the source code of this file.

## Macros
#define | MAX_PC_STR_LEN 32
#define | XUA_VAR_STR "(sua|m3ua|ipa)"

## Functions
bool | ss7_ipv6_sctp_supported (const char *host, bool bind)
uint32_t | ss7_pc_full_mask (const struct osmo_ss7_pc_fmt *pc_fmt)
struct osmo_ss7_asp * | ss7_asp_find_by_socket_addr (int fd, int trans_proto)
| Find an ASP definition matching the local+remote IP/PORT of given fd. More...
bool | ss7_asp_protocol_check_trans_proto (enum osmo_ss7_asp_protocol proto, int trans_proto)
int | ss7_default_trans_proto_for_asp_proto (enum osmo_ss7_asp_protocol proto)
int | ss7_asp_ipa_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg)
int | ss7_asp_xua_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg)
int | ss7_asp_m3ua_tcp_srv_conn_rx_cb (struct osmo_stream_srv *conn, int res, struct msgb *msg)
int | ss7_asp_xua_srv_conn_closed_cb (struct osmo_stream_srv *srv)
int | xua_tcp_segmentation_cb (struct msgb *msg)

## Variables
bool | ss7_initialized

## Macro Definition Documentation

## ◆ MAX_PC_STR_LEN

#define MAX_PC_STR_LEN 32

## ◆ XUA_VAR_STR

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

## Function Documentation

## ◆ ss7_asp_find_by_socket_addr()

struct osmo_ss7_asp * ss7_asp_find_by_socket_addr | ( | int | fd,
|  | int | trans_proto
| ) |  |

Find an ASP definition matching the local+remote IP/PORT of given fd.

Parameters

  [in] | fd | socket descriptor of given socket

Returns
  SS7 ASP in case a matching one is found; NULL otherwise

References osmo_ss7_instance::asp_list, osmo_ss7_asp::cfg, chop_v4_mapped_on_v6_prefix(), get_in_port(), osmo_ss7_asp_peer::host_cnt, osmo_ss7_asp::inst, osmo_ss7_asp::list, osmo_ss7_asp::local, NULL, osmo_ss7_instances, osmo_ss7_asp_peer::port, osmo_ss7_asp::remote, ss7_asp_peer_match_host(), ss7_initialized, and osmo_ss7_asp::trans_proto.

Referenced by xua_accept_cb().

## ◆ ss7_asp_ipa_srv_conn_rx_cb()

int ss7_asp_ipa_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn,
|  | int | res,
|  | struct msgb * | msg
| ) |  |

References osmo_ss7_asp::ctrg, osmo_ss7_instance::ctrg, osmo_ss7_asp::inst, osmo_ss7_asp::ipa, ipa_rx_msg(), osmo_ss7_asp::sls, SS7_ASP_CTR_PKT_RX_TOTAL, and SS7_INST_CTR_PKT_RX_TOTAL.

Referenced by xua_accept_cb().

## ◆ ss7_asp_m3ua_tcp_srv_conn_rx_cb()

int ss7_asp_m3ua_tcp_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn,
|  | int | res,
|  | struct msgb * | msg
| ) |  |

References osmo_ss7_asp::ctrg, osmo_ss7_instance::ctrg, osmo_ss7_asp::inst, m3ua_tcp_rx_msg(), SS7_ASP_CTR_PKT_RX_TOTAL, and SS7_INST_CTR_PKT_RX_TOTAL.

Referenced by xua_accept_cb().

## ◆ ss7_asp_protocol_check_trans_proto()

bool ss7_asp_protocol_check_trans_proto | ( | enum osmo_ss7_asp_protocol | proto,
|  | int | trans_proto
| ) |  |

References OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, OSMO_SS7_ASP_PROT_NONE, and OSMO_SS7_ASP_PROT_SUA.

Referenced by ss7_asp_alloc(), and ss7_xua_server_create2().

## ◆ ss7_asp_xua_srv_conn_closed_cb()

int ss7_asp_xua_srv_conn_closed_cb | ( | struct osmo_stream_srv * | srv | ) |

References osmo_ss7_asp::cfg, osmo_ss7_asp::dyn_allocated, osmo_ss7_asp::fi, osmo_ss7_asp::name, NULL, osmo_ss7_asp_destroy(), OSMO_XLM_PRIM_M_SCTP_RELEASE, osmo_ss7_asp::server, XUA_ASP_E_SCTP_COMM_DOWN_IND, xua_asp_send_xlm_prim_simple(), and xua_rkm_cleanup_dyn_as_for_asp().

Referenced by xua_accept_cb().

## ◆ ss7_asp_xua_srv_conn_rx_cb()

int ss7_asp_xua_srv_conn_rx_cb | ( | struct osmo_stream_srv * | conn,
|  | int | res,
|  | struct msgb * | msg
| ) |  |

References asp_handle_sctp_notif_monitor_primary_address(), osmo_ss7_asp::ctrg, osmo_ss7_instance::ctrg, osmo_ss7_asp::inst, log_sctp_notification(), LOGPASP, OSMO_XLM_PRIM_M_SCTP_RESTART, SS7_ASP_CTR_PKT_RX_TOTAL, SS7_INST_CTR_PKT_RX_TOTAL, xua_asp_send_xlm_prim_simple(), and xua_rx_msg().

Referenced by xua_accept_cb().

## ◆ ss7_default_trans_proto_for_asp_proto()

int ss7_default_trans_proto_for_asp_proto | ( | enum osmo_ss7_asp_protocol | proto | ) |

References OSMO_SS7_ASP_PROT_IPA, OSMO_SS7_ASP_PROT_M3UA, and OSMO_SS7_ASP_PROT_SUA.

Referenced by DEFUN_ATTR(), osmo_sccp_simple_client_on_ss7_id(), osmo_sccp_simple_server_add_clnt(), osmo_sccp_simple_server_on_ss7_id(), osmo_ss7_asp_find(), osmo_ss7_asp_find_or_create(), ss7_vty_write_one_asp(), ss7_vty_write_one_oxs(), ss7_xua_server_create(), and ss7_xua_server_find().

## ◆ ss7_ipv6_sctp_supported()

bool ss7_ipv6_sctp_supported | ( | const char * | host,
|  | bool | bind
| ) |  |

References NULL.

Referenced by ss7_asp_set_default_peer_hosts(), and ss7_xua_server_set_default_local_hosts().

## ◆ ss7_pc_full_mask()

uint32_t ss7_pc_full_mask | ( | const struct osmo_ss7_pc_fmt * | pc_fmt | ) |

References osmo_ss7_pc_width().

Referenced by osmo_ss7_pc_normalize(), and ss7_route_is_fully_qualified().

## ◆ xua_tcp_segmentation_cb()

int xua_tcp_segmentation_cb | ( | struct msgb * | msg | ) |

References xua_common_hdr::data, msg_length, and xua_common_hdr::msg_length.

Referenced by ss7_asp_start_client(), and xua_accept_cb().

## Variable Documentation

## ◆ ss7_initialized

bool ss7_initialized
| extern

Referenced by osmo_ss7_as_add_asp(), osmo_ss7_as_del_asp(), osmo_ss7_as_destroy(), osmo_ss7_as_find_by_l_rk_id(), osmo_ss7_as_find_by_name(), osmo_ss7_as_find_by_proto(), osmo_ss7_as_find_by_rctx(), osmo_ss7_as_find_or_create(), osmo_ss7_as_has_asp(), osmo_ss7_asp_destroy(), osmo_ss7_asp_find2(), osmo_ss7_asp_find_by_name(), osmo_ss7_asp_find_or_create2(), osmo_ss7_asp_restart(), osmo_ss7_asp_send(), osmo_ss7_init(), osmo_ss7_instance_destroy(), osmo_ss7_instance_find(), osmo_ss7_instance_find_or_create(), osmo_ss7_pc_is_local(), osmo_ss7_route_lookup(), ss7_asp_find_by_socket_addr(), ss7_instance_lookup_route(), ss7_link_destroy(), ss7_link_find_or_create(), ss7_linkset_destroy(), ss7_linkset_find_by_name(), ss7_linkset_find_or_create(), ss7_route_alloc(), ss7_route_destroy(), ss7_route_table_find(), ss7_route_table_find_combined_linkset_by_dpc(), ss7_route_table_find_combined_linkset_by_dpc_mask(), ss7_route_table_find_or_create(), ss7_route_table_find_route_by_dpc_mask(), ss7_route_table_find_route_by_dpc_mask_as(), ss7_xua_server_create2(), ss7_xua_server_find2(), and ss7_xua_server_set_local_hosts().