| 1 | #cxx . . $ `<file>/include/osmocom/sigtran/osmo_ss7.h`/pragma once |
| 2 | |
| 3 | #include <stdint.h> |
| 4 | #include <stdbool.h> |
| 5 | |
| 6 | #include <osmocom/core/linuxlist.h> |
| 7 | #include <osmocom/core/utils.h> |
| 8 | #include <osmocom/core/fsm.h> |
| 9 | #include <osmocom/core/msgb.h> |
| 10 | #include <osmocom/core/prim.h> |
| 11 | #include <osmocom/core/socket.h> |
| 12 | #include <osmocom/core/rate_ctr.h> |
| 13 | |
| 14 | extern struct llist_headcxx . . $ llist_head# osmo_ss7_instancescxx . . $ osmo_ss7_instances.; |
| 15 | |
| 16 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance#; |
| 17 | struct osmo_ss7_usercxx . . $ osmo_ss7_user#; |
| 18 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance#; |
| 19 | struct osmo_mtp_primcxx . . $ osmo_mtp_prim#; |
| 20 | struct osmo_xua_layer_managercxx . . $ osmo_xua_layer_manager#; |
| 21 | |
| 22 | int osmo_ss7_initcxx . . $ osmo_ss7_init(b126dc7c1de90089).(void); |
| 23 | int osmo_ss7_find_free_rctxcxx . . $ osmo_ss7_find_free_rctx(428416bbd2d8ff83).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst); |
| 24 | |
| 25 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_pc_is_localcxx . . $ osmo_ss7_pc_is_local(a743d156eba07d52).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# pc); |
| 26 | int osmo_ss7_pointcode_parsecxx . . $ osmo_ss7_pointcode_parse(fdf67995e4c57db1).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *str); |
| 27 | int osmo_ss7_pointcode_parse_mask_or_lencxx . . $ osmo_ss7_pointcode_parse_mask_or_len(fdf67995e4c57db1).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *in); |
| 28 | const char *osmo_ss7_pointcode_print_bufcxx . . $ osmo_ss7_pointcode_print_buf(c17941c7d687d52b).(char *buf, size_tcxx . . $ size_t# buf_len, const struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# pc); |
| 29 | const char *osmo_ss7_pointcode_printcxx . . $ osmo_ss7_pointcode_print(e8bc9064713051b5).(const struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# pc); |
| 30 | const char *osmo_ss7_pointcode_print2cxx . . $ osmo_ss7_pointcode_print2(e8bc9064713051b5).(const struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# pc); |
| 31 | |
| 32 | /* All known point-code formats have a length of or below 24 bit. |
| 33 | * A point-code value exceeding that is used to indicate an unset PC. */ |
| 34 | #define OSMO_SS7_PC_INVALIDcxx . . $ `include/osmocom/sigtran/osmo_ss7.h:34:9`! 0xffffffff |
| 35 | static inlinecxx . . $ `<external>/10627926521687321252/linuxlist.h:22:9`! boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_pc_is_validcxx . . $ osmo_ss7_pc_is_valid(dfa6e707f7696010).(uint32_tcxx . . $ uint32_t# pc) |
| 36 | { |
| 37 | return pc <= 0x00ffffff; |
| 38 | } |
| 39 | |
| 40 | /*********************************************************************** |
| 41 | * SS7 Routing Tables |
| 42 | ***********************************************************************/ |
| 43 | |
| 44 | struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# { |
| 45 | /*! member in list of routing tables */ |
| 46 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_ss7_route_table#list.; |
| 47 | /*! \ref osmo_ss7_instance to which we belong */ |
| 48 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *instcxx . . $ osmo_ss7_route_table#inst.; |
| 49 | /*! list of \ref osmo_ss7_route */ |
| 50 | struct llist_headcxx . . $ llist_head# routescxx . . $ osmo_ss7_route_table#routes.; |
| 51 | |
| 52 | structcxx . . $ osmo_ss7_route_table#$anonymous_type_0# { |
| 53 | char *namecxx . . $ osmo_ss7_route_table#$anonymous_type_0#name.; |
| 54 | char *descriptioncxx . . $ osmo_ss7_route_table#$anonymous_type_0#description.; |
| 55 | } cfgcxx . . $ osmo_ss7_route_table#cfg.; |
| 56 | }; |
| 57 | |
| 58 | struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# * |
| 59 | osmo_ss7_route_table_findcxx . . $ osmo_ss7_route_table_find(253fe3943d692c3b).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name); |
| 60 | struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# * |
| 61 | osmo_ss7_route_table_find_or_createcxx . . $ osmo_ss7_route_table_find_or_create(253fe3943d692c3b).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name); |
| 62 | void osmo_ss7_route_table_destroycxx . . $ osmo_ss7_route_table_destroy(8affba22933d5bcc).(struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# *rtbl); |
| 63 | |
| 64 | /*********************************************************************** |
| 65 | * SS7 Instances |
| 66 | ***********************************************************************/ |
| 67 | |
| 68 | struct osmo_ss7_pc_fmtcxx . . $ osmo_ss7_pc_fmt# { |
| 69 | char delimitercxx . . $ osmo_ss7_pc_fmt#delimiter.; |
| 70 | uint8_tcxx . . $ uint8_t# component_lencxx . . $ osmo_ss7_pc_fmt#component_len.[3]; |
| 71 | }; |
| 72 | |
| 73 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# { |
| 74 | /*! member of global list of instances */ |
| 75 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_ss7_instance#list.; |
| 76 | /*! list of \ref osmo_ss7_linkset */ |
| 77 | struct llist_headcxx . . $ llist_head# linksetscxx . . $ osmo_ss7_instance#linksets.; |
| 78 | /*! list of \ref osmo_ss7_as */ |
| 79 | struct llist_headcxx . . $ llist_head# as_listcxx . . $ osmo_ss7_instance#as_list.; |
| 80 | /*! list of \ref osmo_ss7_asp */ |
| 81 | struct llist_headcxx . . $ llist_head# asp_listcxx . . $ osmo_ss7_instance#asp_list.; |
| 82 | /*! list of \ref osmo_ss7_route_table */ |
| 83 | struct llist_headcxx . . $ llist_head# rtable_listcxx . . $ osmo_ss7_instance#rtable_list.; |
| 84 | /*! list of \ref osmo_xua_servers */ |
| 85 | struct llist_headcxx . . $ llist_head# xua_serverscxx . . $ osmo_ss7_instance#xua_servers.; |
| 86 | /* array for faster lookup of user (indexed by service |
| 87 | * indicator) */ |
| 88 | const struct osmo_ss7_usercxx . . $ osmo_ss7_user# *usercxx . . $ osmo_ss7_instance#user.[16]; |
| 89 | |
| 90 | struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# *rtable_systemcxx . . $ osmo_ss7_instance#rtable_system.; |
| 91 | |
| 92 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# *sccpcxx . . $ osmo_ss7_instance#sccp.; |
| 93 | |
| 94 | structcxx . . $ osmo_ss7_instance#$anonymous_type_1# { |
| 95 | uint32_tcxx . . $ uint32_t# idcxx . . $ osmo_ss7_instance#$anonymous_type_1#id.; |
| 96 | char *namecxx . . $ osmo_ss7_instance#$anonymous_type_1#name.; |
| 97 | char *descriptioncxx . . $ osmo_ss7_instance#$anonymous_type_1#description.; |
| 98 | uint32_tcxx . . $ uint32_t# primary_pccxx . . $ osmo_ss7_instance#$anonymous_type_1#primary_pc.; |
| 99 | /* secondary PCs */ |
| 100 | /* capability PCs */ |
| 101 | uint8_tcxx . . $ uint8_t# network_indicatorcxx . . $ osmo_ss7_instance#$anonymous_type_1#network_indicator.; |
| 102 | struct osmo_ss7_pc_fmtcxx . . $ osmo_ss7_pc_fmt# pc_fmtcxx . . $ osmo_ss7_instance#$anonymous_type_1#pc_fmt.; |
| 103 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! permit_dyn_rkm_alloccxx . . $ osmo_ss7_instance#$anonymous_type_1#permit_dyn_rkm_alloc.; |
| 104 | struct llist_headcxx . . $ llist_head# sccp_address_bookcxx . . $ osmo_ss7_instance#$anonymous_type_1#sccp_address_book.; |
| 105 | } cfgcxx . . $ osmo_ss7_instance#cfg.; |
| 106 | }; |
| 107 | |
| 108 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *osmo_ss7_instance_findcxx . . $ osmo_ss7_instance_find(58042434a8db149).(uint32_tcxx . . $ uint32_t# id); |
| 109 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# * |
| 110 | osmo_ss7_instance_find_or_createcxx . . $ osmo_ss7_instance_find_or_create(a0edff17b1f82b62).(void *ctx, uint32_tcxx . . $ uint32_t# id); |
| 111 | void osmo_ss7_instance_destroycxx . . $ osmo_ss7_instance_destroy(5b4b279f833dd663).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst); |
| 112 | int osmo_ss7_instance_set_pc_fmtcxx . . $ osmo_ss7_instance_set_pc_fmt(3ff639e911b93a26).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 113 | uint8_tcxx . . $ uint8_t# c0, uint8_tcxx . . $ uint8_t# c1, uint8_tcxx . . $ uint8_t# c2); |
| 114 | |
| 115 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# *osmo_ss7_ensure_sccpcxx . . $ osmo_ss7_ensure_sccp(68bb61577acd21bf).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst); |
| 116 | |
| 117 | uint8_tcxx . . $ uint8_t# osmo_ss7_pc_widthcxx . . $ osmo_ss7_pc_width(d9b1dcdd8681983a).(const struct osmo_ss7_pc_fmtcxx . . $ osmo_ss7_pc_fmt# *pc_fmt); |
| 118 | uint32_tcxx . . $ uint32_t# osmo_ss7_pc_normalizecxx . . $ osmo_ss7_pc_normalize(c2c700bffceac115).(const struct osmo_ss7_pc_fmtcxx . . $ osmo_ss7_pc_fmt# *pc_fmt, uint32_tcxx . . $ uint32_t# pc); |
| 119 | |
| 120 | /*********************************************************************** |
| 121 | * MTP Users (Users of MTP, such as SCCP or ISUP) |
| 122 | ***********************************************************************/ |
| 123 | |
| 124 | struct osmo_ss7_usercxx . . $ osmo_ss7_user# { |
| 125 | /* pointer back to SS7 instance */ |
| 126 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *instcxx . . $ osmo_ss7_user#inst.; |
| 127 | /* name of the user */ |
| 128 | const char *namecxx . . $ osmo_ss7_user#name.; |
| 129 | /* primitive call-back for incoming MTP primitives */ |
| 130 | osmo_prim_cbcxx . . $ osmo_prim_cb# prim_cbcxx . . $ osmo_ss7_user#prim_cb.; |
| 131 | /* private data */ |
| 132 | void *privcxx . . $ osmo_ss7_user#priv.; |
| 133 | }; |
| 134 | |
| 135 | int osmo_ss7_user_registercxx . . $ osmo_ss7_user_register(ab26a8c2bbf14e62).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint8_tcxx . . $ uint8_t# service_ind, |
| 136 | struct osmo_ss7_usercxx . . $ osmo_ss7_user# *user); |
| 137 | |
| 138 | int osmo_ss7_user_unregistercxx . . $ osmo_ss7_user_unregister(ab26a8c2bbf14e62).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint8_tcxx . . $ uint8_t# service_ind, |
| 139 | struct osmo_ss7_usercxx . . $ osmo_ss7_user# *user); |
| 140 | |
| 141 | int osmo_ss7_mtp_to_usercxx . . $ osmo_ss7_mtp_to_user(7a464c5bf527acad).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, struct osmo_mtp_primcxx . . $ osmo_mtp_prim# *omp); |
| 142 | |
| 143 | /* SS7 User wants to issue MTP-TRANSFER.req */ |
| 144 | int osmo_ss7_user_mtp_xfer_reqcxx . . $ osmo_ss7_user_mtp_xfer_req(7a464c5bf527acad).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 145 | struct osmo_mtp_primcxx . . $ osmo_mtp_prim# *omp); |
| 146 | |
| 147 | /*********************************************************************** |
| 148 | * SS7 Links |
| 149 | ***********************************************************************/ |
| 150 | |
| 151 | enum osmo_ss7_link_adm_statecxx . . $ osmo_ss7_link_adm_state# { |
| 152 | OSMO_SS7_LS_SHUTDOWNcxx . . $ OSMO_SS7_LS_SHUTDOWN., |
| 153 | OSMO_SS7_LS_INHIBITEDcxx . . $ OSMO_SS7_LS_INHIBITED., |
| 154 | OSMO_SS7_LS_ENABLEDcxx . . $ OSMO_SS7_LS_ENABLED., |
| 155 | _NUM_OSMO_SS7_LScxx . . $ _NUM_OSMO_SS7_LS. |
| 156 | }; |
| 157 | |
| 158 | struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset#; |
| 159 | struct osmo_ss7_linkcxx . . $ osmo_ss7_link#; |
| 160 | |
| 161 | struct osmo_ss7_linkcxx . . $ osmo_ss7_link# { |
| 162 | /*! \ref osmo_ss7_linkset to which we belong */ |
| 163 | struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# *linksetcxx . . $ osmo_ss7_link#linkset.; |
| 164 | structcxx . . $ osmo_ss7_link#$anonymous_type_2# { |
| 165 | char *namecxx . . $ osmo_ss7_link#$anonymous_type_2#name.; |
| 166 | char *descriptioncxx . . $ osmo_ss7_link#$anonymous_type_2#description.; |
| 167 | uint32_tcxx . . $ uint32_t# idcxx . . $ osmo_ss7_link#$anonymous_type_2#id.; |
| 168 | |
| 169 | enum osmo_ss7_link_adm_statecxx . . $ osmo_ss7_link_adm_state# adm_statecxx . . $ osmo_ss7_link#$anonymous_type_2#adm_state.; |
| 170 | } cfgcxx . . $ osmo_ss7_link#cfg.; |
| 171 | }; |
| 172 | |
| 173 | void osmo_ss7_link_destroycxx . . $ osmo_ss7_link_destroy(2f1486a49cb60c8d).(struct osmo_ss7_linkcxx . . $ osmo_ss7_link# *link); |
| 174 | struct osmo_ss7_linkcxx . . $ osmo_ss7_link# * |
| 175 | osmo_ss7_link_find_or_createcxx . . $ osmo_ss7_link_find_or_create(54572feddeeaf21a).(struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# *lset, uint32_tcxx . . $ uint32_t# id); |
| 176 | |
| 177 | /*********************************************************************** |
| 178 | * SS7 Linksets |
| 179 | ***********************************************************************/ |
| 180 | |
| 181 | struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# { |
| 182 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_ss7_linkset#list.; |
| 183 | /*! \ref osmo_ss7_instance to which we belong */ |
| 184 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *instcxx . . $ osmo_ss7_linkset#inst.; |
| 185 | /*! array of \ref osmo_ss7_link */ |
| 186 | struct osmo_ss7_linkcxx . . $ osmo_ss7_link# *linkscxx . . $ osmo_ss7_linkset#links.[16]; |
| 187 | |
| 188 | structcxx . . $ osmo_ss7_linkset#$anonymous_type_3# { |
| 189 | char *namecxx . . $ osmo_ss7_linkset#$anonymous_type_3#name.; |
| 190 | char *descriptioncxx . . $ osmo_ss7_linkset#$anonymous_type_3#description.; |
| 191 | uint32_tcxx . . $ uint32_t# adjacent_pccxx . . $ osmo_ss7_linkset#$anonymous_type_3#adjacent_pc.; |
| 192 | uint32_tcxx . . $ uint32_t# local_pccxx . . $ osmo_ss7_linkset#$anonymous_type_3#local_pc.; |
| 193 | } cfgcxx . . $ osmo_ss7_linkset#cfg.; |
| 194 | }; |
| 195 | |
| 196 | void osmo_ss7_linkset_destroycxx . . $ osmo_ss7_linkset_destroy(956052835e402a67).(struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# *lset); |
| 197 | struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# * |
| 198 | osmo_ss7_linkset_find_by_namecxx . . $ osmo_ss7_linkset_find_by_name(32a09e3f45af6bf3).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name); |
| 199 | struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# * |
| 200 | osmo_ss7_linkset_find_or_createcxx . . $ osmo_ss7_linkset_find_or_create(9f1ae0b0a5883552).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name, uint32_tcxx . . $ uint32_t# pc); |
| 201 | |
| 202 | |
| 203 | /*********************************************************************** |
| 204 | * SS7 Routes |
| 205 | ***********************************************************************/ |
| 206 | |
| 207 | struct osmo_ss7_routecxx . . $ osmo_ss7_route# { |
| 208 | /*! member in \ref osmo_ss7_route_table.routes */ |
| 209 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_ss7_route#list.; |
| 210 | /*! \ref osmo_ss7_route_table to which we belong */ |
| 211 | struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# *rtablecxx . . $ osmo_ss7_route#rtable.; |
| 212 | |
| 213 | structcxx . . $ osmo_ss7_route#$anonymous_type_4# { |
| 214 | /*! pointer to linkset (destination) of route */ |
| 215 | struct osmo_ss7_linksetcxx . . $ osmo_ss7_linkset# *linksetcxx . . $ osmo_ss7_route#$anonymous_type_4#linkset.; |
| 216 | /*! pointer to Application Server */ |
| 217 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# *ascxx . . $ osmo_ss7_route#$anonymous_type_4#as.; |
| 218 | } destcxx . . $ osmo_ss7_route#dest.; |
| 219 | |
| 220 | structcxx . . $ osmo_ss7_route#$anonymous_type_5# { |
| 221 | /* FIXME: presence? */ |
| 222 | uint32_tcxx . . $ uint32_t# pccxx . . $ osmo_ss7_route#$anonymous_type_5#pc.; |
| 223 | uint32_tcxx . . $ uint32_t# maskcxx . . $ osmo_ss7_route#$anonymous_type_5#mask.; |
| 224 | /*! human-specified linkset name */ |
| 225 | char *linkset_namecxx . . $ osmo_ss7_route#$anonymous_type_5#linkset_name.; |
| 226 | /*! lower priority is higher */ |
| 227 | uint32_tcxx . . $ uint32_t# prioritycxx . . $ osmo_ss7_route#$anonymous_type_5#priority.; |
| 228 | uint8_tcxx . . $ uint8_t# qos_classcxx . . $ osmo_ss7_route#$anonymous_type_5#qos_class.; |
| 229 | } cfgcxx . . $ osmo_ss7_route#cfg.; |
| 230 | }; |
| 231 | |
| 232 | struct osmo_ss7_routecxx . . $ osmo_ss7_route# * |
| 233 | osmo_ss7_route_find_dpccxx . . $ osmo_ss7_route_find_dpc(59f65fc1c8df89dc).(struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# *rtbl, uint32_tcxx . . $ uint32_t# dpc); |
| 234 | struct osmo_ss7_routecxx . . $ osmo_ss7_route# * |
| 235 | osmo_ss7_route_find_dpc_maskcxx . . $ osmo_ss7_route_find_dpc_mask(c53ac19b78036539).(struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# *rtbl, uint32_tcxx . . $ uint32_t# dpc, |
| 236 | uint32_tcxx . . $ uint32_t# mask); |
| 237 | struct osmo_ss7_routecxx . . $ osmo_ss7_route# * |
| 238 | osmo_ss7_route_lookupcxx . . $ osmo_ss7_route_lookup(214e8e9dbf4fc800).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# dpc); |
| 239 | struct osmo_ss7_routecxx . . $ osmo_ss7_route# * |
| 240 | osmo_ss7_route_createcxx . . $ osmo_ss7_route_create(6bd5c7a474f5b32b).(struct osmo_ss7_route_tablecxx . . $ osmo_ss7_route_table# *rtbl, uint32_tcxx . . $ uint32_t# dpc, |
| 241 | uint32_tcxx . . $ uint32_t# mask, const char *linkset_name); |
| 242 | void osmo_ss7_route_destroycxx . . $ osmo_ss7_route_destroy(e12e916c56dc571c).(struct osmo_ss7_routecxx . . $ osmo_ss7_route# *rt); |
| 243 | const char *osmo_ss7_route_printcxx . . $ osmo_ss7_route_print(c1b76ea0d83d8b54).(const struct osmo_ss7_routecxx . . $ osmo_ss7_route# *rt); |
| 244 | const char *osmo_ss7_route_namecxx . . $ osmo_ss7_route_name(3f264a30b0a4f1f7).(struct osmo_ss7_routecxx . . $ osmo_ss7_route# *rt, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! list_asps); |
| 245 | |
| 246 | |
| 247 | /*********************************************************************** |
| 248 | * SS7 Application Servers |
| 249 | ***********************************************************************/ |
| 250 | |
| 251 | struct osmo_ss7_routing_keycxx . . $ osmo_ss7_routing_key# { |
| 252 | uint32_tcxx . . $ uint32_t# contextcxx . . $ osmo_ss7_routing_key#context.; |
| 253 | uint32_tcxx . . $ uint32_t# l_rk_idcxx . . $ osmo_ss7_routing_key#l_rk_id.; |
| 254 | |
| 255 | uint32_tcxx . . $ uint32_t# pccxx . . $ osmo_ss7_routing_key#pc.; |
| 256 | uint8_tcxx . . $ uint8_t# sicxx . . $ osmo_ss7_routing_key#si.; |
| 257 | uint32_tcxx . . $ uint32_t# ssncxx . . $ osmo_ss7_routing_key#ssn.; |
| 258 | /* FIXME: more complex routing keys */ |
| 259 | }; |
| 260 | |
| 261 | enum osmo_ss7_as_traffic_modecxx . . $ osmo_ss7_as_traffic_mode# { |
| 262 | OSMO_SS7_AS_TMOD_OVERRIDEcxx . . $ OSMO_SS7_AS_TMOD_OVERRIDE. = 0, /* default */ |
| 263 | OSMO_SS7_AS_TMOD_BCASTcxx . . $ OSMO_SS7_AS_TMOD_BCAST., |
| 264 | OSMO_SS7_AS_TMOD_LOADSHAREcxx . . $ OSMO_SS7_AS_TMOD_LOADSHARE., |
| 265 | OSMO_SS7_AS_TMOD_ROUNDROBINcxx . . $ OSMO_SS7_AS_TMOD_ROUNDROBIN., |
| 266 | _NUM_OSMO_SS7_ASP_TMODcxx . . $ _NUM_OSMO_SS7_ASP_TMOD. |
| 267 | }; |
| 268 | |
| 269 | extern struct value_stringcxx . . $ value_string# osmo_ss7_as_traffic_mode_valscxx . . $ osmo_ss7_as_traffic_mode_vals.[]; |
| 270 | |
| 271 | static inlinecxx . . $ `<external>/10627926521687321252/linuxlist.h:22:9`! const char * |
| 272 | osmo_ss7_as_traffic_mode_namecxx . . $ osmo_ss7_as_traffic_mode_name(f58566cd5311eef1).(enum osmo_ss7_as_traffic_modecxx . . $ osmo_ss7_as_traffic_mode# mode) |
| 273 | { |
| 274 | return get_value_stringcxx . . $ get_value_string(c9db86ff1f80b9ea).(osmo_ss7_as_traffic_mode_valscxx . . $ osmo_ss7_as_traffic_mode_vals., mode); |
| 275 | } |
| 276 | |
| 277 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# { |
| 278 | OSMO_SS7_ASP_PROT_NONEcxx . . $ OSMO_SS7_ASP_PROT_NONE., |
| 279 | OSMO_SS7_ASP_PROT_SUAcxx . . $ OSMO_SS7_ASP_PROT_SUA., |
| 280 | OSMO_SS7_ASP_PROT_M3UAcxx . . $ OSMO_SS7_ASP_PROT_M3UA., |
| 281 | OSMO_SS7_ASP_PROT_IPAcxx . . $ OSMO_SS7_ASP_PROT_IPA., |
| 282 | _NUM_OSMO_SS7_ASP_PROTcxx . . $ _NUM_OSMO_SS7_ASP_PROT. |
| 283 | }; |
| 284 | |
| 285 | extern struct value_stringcxx . . $ value_string# osmo_ss7_asp_protocol_valscxx . . $ osmo_ss7_asp_protocol_vals.[]; |
| 286 | |
| 287 | static inlinecxx . . $ `<external>/10627926521687321252/linuxlist.h:22:9`! const char * |
| 288 | osmo_ss7_asp_protocol_namecxx . . $ osmo_ss7_asp_protocol_name(6624849052f48797).(enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# mode) |
| 289 | { |
| 290 | return get_value_stringcxx . . $ get_value_string(c9db86ff1f80b9ea).(osmo_ss7_asp_protocol_valscxx . . $ osmo_ss7_asp_protocol_vals., mode); |
| 291 | } |
| 292 | |
| 293 | int osmo_ss7_asp_protocol_portcxx . . $ osmo_ss7_asp_protocol_port(cf28de17bd6af606).(enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# prot); |
| 294 | |
| 295 | enum osmo_ss7_as_patch_sccp_modecxx . . $ osmo_ss7_as_patch_sccp_mode# { |
| 296 | OSMO_SS7_PATCH_NONEcxx . . $ OSMO_SS7_PATCH_NONE., /* no patching of SCCP */ |
| 297 | OSMO_SS7_PATCH_BOTHcxx . . $ OSMO_SS7_PATCH_BOTH., /* patch both OPC and DPC into SCCP addresses */ |
| 298 | }; |
| 299 | |
| 300 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# { |
| 301 | /*! entry in 'ref osmo_ss7_instance.as_list */ |
| 302 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_ss7_as#list.; |
| 303 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *instcxx . . $ osmo_ss7_as#inst.; |
| 304 | |
| 305 | /*! AS FSM */ |
| 306 | struct osmo_fsm_instcxx . . $ osmo_fsm_inst# *ficxx . . $ osmo_ss7_as#fi.; |
| 307 | |
| 308 | /*! Were we dynamically allocated by RKM? */ |
| 309 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! rkm_dyn_allocatedcxx . . $ osmo_ss7_as#rkm_dyn_allocated.; |
| 310 | |
| 311 | /*! Were we allocated by "simple client" support? */ |
| 312 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! simple_client_allocatedcxx . . $ osmo_ss7_as#simple_client_allocated.; |
| 313 | |
| 314 | /*! Rate Counter Group */ |
| 315 | struct rate_ctr_groupcxx . . $ rate_ctr_group# *ctrgcxx . . $ osmo_ss7_as#ctrg.; |
| 316 | |
| 317 | structcxx . . $ osmo_ss7_as#$anonymous_type_6# { |
| 318 | char *namecxx . . $ osmo_ss7_as#$anonymous_type_6#name.; |
| 319 | char *descriptioncxx . . $ osmo_ss7_as#$anonymous_type_6#description.; |
| 320 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# protocxx . . $ osmo_ss7_as#$anonymous_type_6#proto.; |
| 321 | struct osmo_ss7_routing_keycxx . . $ osmo_ss7_routing_key# routing_keycxx . . $ osmo_ss7_as#$anonymous_type_6#routing_key.; |
| 322 | enum osmo_ss7_as_traffic_modecxx . . $ osmo_ss7_as_traffic_mode# modecxx . . $ osmo_ss7_as#$anonymous_type_6#mode.; |
| 323 | /* traffic mode was configured by VTY / config file */ |
| 324 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! mode_set_by_vtycxx . . $ osmo_ss7_as#$anonymous_type_6#mode_set_by_vty.; |
| 325 | /* traffic mode was configured by RKM (routing key management) or first ASPAC */ |
| 326 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! mode_set_by_peercxx . . $ osmo_ss7_as#$anonymous_type_6#mode_set_by_peer.; |
| 327 | uint32_tcxx . . $ uint32_t# recovery_timeout_mseccxx . . $ osmo_ss7_as#$anonymous_type_6#recovery_timeout_msec.; |
| 328 | uint8_tcxx . . $ uint8_t# qos_classcxx . . $ osmo_ss7_as#$anonymous_type_6#qos_class.; |
| 329 | structcxx . . $ osmo_ss7_as#$anonymous_type_6#$anonymous_type_7# { |
| 330 | uint32_tcxx . . $ uint32_t# dpccxx . . $ osmo_ss7_as#$anonymous_type_6#$anonymous_type_7#dpc.; |
| 331 | enum osmo_ss7_as_patch_sccp_modecxx . . $ osmo_ss7_as_patch_sccp_mode# sccp_modecxx . . $ osmo_ss7_as#$anonymous_type_6#$anonymous_type_7#sccp_mode.; |
| 332 | } pc_overridecxx . . $ osmo_ss7_as#$anonymous_type_6#pc_override.; |
| 333 | |
| 334 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *aspscxx . . $ osmo_ss7_as#$anonymous_type_6#asps.[16]; |
| 335 | uint8_tcxx . . $ uint8_t# last_asp_idx_sentcxx . . $ osmo_ss7_as#$anonymous_type_6#last_asp_idx_sent.; /* used for load-sharing traffic mode (round robin implementation) */ |
| 336 | } cfgcxx . . $ osmo_ss7_as#cfg.; |
| 337 | }; |
| 338 | |
| 339 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# * |
| 340 | osmo_ss7_as_find_by_namecxx . . $ osmo_ss7_as_find_by_name(a8f114b3483ae34a).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name); |
| 341 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# * |
| 342 | osmo_ss7_as_find_by_rctxcxx . . $ osmo_ss7_as_find_by_rctx(e44b0c77bdcdf94a).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# rctx); |
| 343 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# * |
| 344 | osmo_ss7_as_find_by_l_rk_idcxx . . $ osmo_ss7_as_find_by_l_rk_id(e44b0c77bdcdf94a).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, uint32_tcxx . . $ uint32_t# l_rk_id); |
| 345 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# *osmo_ss7_as_find_by_protocxx . . $ osmo_ss7_as_find_by_proto(5de7f57206068db3).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 346 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto); |
| 347 | struct osmo_ss7_ascxx . . $ osmo_ss7_as# * |
| 348 | osmo_ss7_as_find_or_createcxx . . $ osmo_ss7_as_find_or_create(2fb7c7ab020486e3).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name, |
| 349 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto); |
| 350 | int osmo_ss7_as_add_aspcxx . . $ osmo_ss7_as_add_asp(56adfde6be7c4938).(struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as, const char *asp_name); |
| 351 | int osmo_ss7_as_del_aspcxx . . $ osmo_ss7_as_del_asp(56adfde6be7c4938).(struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as, const char *asp_name); |
| 352 | void osmo_ss7_as_destroycxx . . $ osmo_ss7_as_destroy(a5e8966e77f5f5c0).(struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as); |
| 353 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_as_has_aspcxx . . $ osmo_ss7_as_has_asp(1fe1cea983043050).(const struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as, |
| 354 | const struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 355 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_as_downcxx . . $ osmo_ss7_as_down(a10467813ad47e85).(const struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as); |
| 356 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_as_activecxx . . $ osmo_ss7_as_active(a10467813ad47e85).(const struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as); |
| 357 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_as_tmode_compatible_xuacxx . . $ osmo_ss7_as_tmode_compatible_xua(53d289b94de437).(struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as, uint32_tcxx . . $ uint32_t# m3ua_tmt); |
| 358 | void osmo_ss7_asp_disconnectcxx . . $ osmo_ss7_asp_disconnect(da22411590fb0bb8).(struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 359 | |
| 360 | |
| 361 | /*********************************************************************** |
| 362 | * SS7 Application Server Processes |
| 363 | ***********************************************************************/ |
| 364 | |
| 365 | struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# { |
| 366 | char *hostcxx . . $ osmo_ss7_asp_peer#host.[OSMO_SOCK_MAX_ADDRScxx . . $ `<external>/17873200765590824845/socket.h:20:9`!]; |
| 367 | size_tcxx . . $ size_t# host_cntcxx . . $ osmo_ss7_asp_peer#host_cnt.; |
| 368 | uint16_tcxx . . $ uint16_t# portcxx . . $ osmo_ss7_asp_peer#port.; |
| 369 | /* index in "hosts" array marking the SCTP Primary Address, -1 if no explicit Primary Address set */ |
| 370 | int idx_primarycxx . . $ osmo_ss7_asp_peer#idx_primary.; |
| 371 | }; |
| 372 | |
| 373 | enum osmo_ss7_asp_admin_statecxx . . $ osmo_ss7_asp_admin_state# { |
| 374 | /*! no SCTP association with peer */ |
| 375 | OSMO_SS7_ASP_ADM_S_SHUTDOWNcxx . . $ OSMO_SS7_ASP_ADM_S_SHUTDOWN., |
| 376 | /*! SCP association, but reject ASP-ACTIVE */ |
| 377 | OSMO_SS7_ASP_ADM_S_BLOCKEDcxx . . $ OSMO_SS7_ASP_ADM_S_BLOCKED., |
| 378 | /*! in normal operation */ |
| 379 | OSMO_SS7_ASP_ADM_S_ENABLEDcxx . . $ OSMO_SS7_ASP_ADM_S_ENABLED., |
| 380 | }; |
| 381 | |
| 382 | enum osmo_ss7_asp_rolecxx . . $ osmo_ss7_asp_role# { |
| 383 | OSMO_SS7_ASP_ROLE_ASPcxx . . $ OSMO_SS7_ASP_ROLE_ASP., |
| 384 | OSMO_SS7_ASP_ROLE_SGcxx . . $ OSMO_SS7_ASP_ROLE_SG., |
| 385 | OSMO_SS7_ASP_ROLE_IPSPcxx . . $ OSMO_SS7_ASP_ROLE_IPSP., |
| 386 | }; |
| 387 | |
| 388 | extern const struct value_stringcxx . . $ value_string# osmo_ss7_asp_role_namescxx . . $ osmo_ss7_asp_role_names.[]; |
| 389 | |
| 390 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# { |
| 391 | /*! entry in \ref osmo_ss7_instance.asp_list */ |
| 392 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_ss7_asp#list.; |
| 393 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *instcxx . . $ osmo_ss7_asp#inst.; |
| 394 | |
| 395 | /*! ASP FSM */ |
| 396 | struct osmo_fsm_instcxx . . $ osmo_fsm_inst# *ficxx . . $ osmo_ss7_asp#fi.; |
| 397 | |
| 398 | /*! \ref osmo_xua_server over which we were established */ |
| 399 | struct osmo_xua_servercxx . . $ osmo_xua_server# *xua_servercxx . . $ osmo_ss7_asp#xua_server.; |
| 400 | struct llist_headcxx . . $ llist_head# siblingscxx . . $ osmo_ss7_asp#siblings.; |
| 401 | |
| 402 | /*! osmo_stream / libosmo-netif handles */ |
| 403 | struct osmo_stream_clicxx . . $ osmo_stream_cli# *clientcxx . . $ osmo_ss7_asp#client.; |
| 404 | struct osmo_stream_srvcxx . . $ osmo_stream_srv# *servercxx . . $ osmo_ss7_asp#server.; |
| 405 | /*! pre-formatted human readable local/remote socket name */ |
| 406 | char *sock_namecxx . . $ osmo_ss7_asp#sock_name.; |
| 407 | |
| 408 | /* ASP Identifier for ASP-UP + NTFY */ |
| 409 | uint32_tcxx . . $ uint32_t# asp_idcxx . . $ osmo_ss7_asp#asp_id.; |
| 410 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! asp_id_presentcxx . . $ osmo_ss7_asp#asp_id_present.; |
| 411 | |
| 412 | /* Layer Manager to which we talk */ |
| 413 | const struct osmo_xua_layer_managercxx . . $ osmo_xua_layer_manager# *lmcxx . . $ osmo_ss7_asp#lm.; |
| 414 | void *lm_privcxx . . $ osmo_ss7_asp#lm_priv.; |
| 415 | |
| 416 | /*! Were we dynamically allocated */ |
| 417 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! dyn_allocatedcxx . . $ osmo_ss7_asp#dyn_allocated.; |
| 418 | |
| 419 | /*! Were we allocated by "simple client" support? */ |
| 420 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! simple_client_allocatedcxx . . $ osmo_ss7_asp#simple_client_allocated.; |
| 421 | |
| 422 | /*! Rate Counter Group */ |
| 423 | struct rate_ctr_groupcxx . . $ rate_ctr_group# *ctrgcxx . . $ osmo_ss7_asp#ctrg.; |
| 424 | |
| 425 | /*! Pending message for non-blocking IPA read */ |
| 426 | struct msgbcxx . . $ msgb# *pending_msgcxx . . $ osmo_ss7_asp#pending_msg.; |
| 427 | |
| 428 | structcxx . . $ osmo_ss7_asp#$anonymous_type_8# { |
| 429 | char *namecxx . . $ osmo_ss7_asp#$anonymous_type_8#name.; |
| 430 | char *descriptioncxx . . $ osmo_ss7_asp#$anonymous_type_8#description.; |
| 431 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# protocxx . . $ osmo_ss7_asp#$anonymous_type_8#proto.; |
| 432 | enum osmo_ss7_asp_admin_statecxx . . $ osmo_ss7_asp_admin_state# adm_statecxx . . $ osmo_ss7_asp#$anonymous_type_8#adm_state.; |
| 433 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! is_servercxx . . $ osmo_ss7_asp#$anonymous_type_8#is_server.; |
| 434 | enum osmo_ss7_asp_rolecxx . . $ osmo_ss7_asp_role# rolecxx . . $ osmo_ss7_asp#$anonymous_type_8#role.; |
| 435 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! role_set_by_vtycxx . . $ osmo_ss7_asp#$anonymous_type_8#role_set_by_vty.; |
| 436 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! trans_role_set_by_vtycxx . . $ osmo_ss7_asp#$anonymous_type_8#trans_role_set_by_vty.; |
| 437 | |
| 438 | struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# localcxx . . $ osmo_ss7_asp#$anonymous_type_8#local.; |
| 439 | struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# remotecxx . . $ osmo_ss7_asp#$anonymous_type_8#remote.; |
| 440 | uint8_tcxx . . $ uint8_t# qos_classcxx . . $ osmo_ss7_asp#$anonymous_type_8#qos_class.; |
| 441 | uint32_tcxx . . $ uint32_t# quirkscxx . . $ osmo_ss7_asp#$anonymous_type_8#quirks.; |
| 442 | |
| 443 | /* T_defs used by the default_lm: */ |
| 444 | struct osmo_tdefcxx . . $ osmo_tdef# *T_defs_lmcxx . . $ osmo_ss7_asp#$anonymous_type_8#T_defs_lm.; |
| 445 | |
| 446 | structcxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9# { |
| 447 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! num_ostreams_presentcxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#num_ostreams_present.; |
| 448 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! max_instreams_presentcxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#max_instreams_present.; |
| 449 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! max_attempts_presentcxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#max_attempts_present.; |
| 450 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! max_init_timeo_presentcxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#max_init_timeo_present.; |
| 451 | uint16_tcxx . . $ uint16_t# num_ostreams_valuecxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#num_ostreams_value.; |
| 452 | uint16_tcxx . . $ uint16_t# max_instreams_valuecxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#max_instreams_value.; |
| 453 | uint16_tcxx . . $ uint16_t# max_attempts_valuecxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#max_attempts_value.; |
| 454 | uint16_tcxx . . $ uint16_t# max_init_timeo_valuecxx . . $ osmo_ss7_asp#$anonymous_type_8#$anonymous_type_9#max_init_timeo_value.; /* ms */ |
| 455 | } sctp_initcxx . . $ osmo_ss7_asp#$anonymous_type_8#sctp_init.; |
| 456 | |
| 457 | /*! The underlaying transport protocol (one of IPPROTO_*) */ |
| 458 | int trans_protocxx . . $ osmo_ss7_asp#$anonymous_type_8#trans_proto.; |
| 459 | } cfgcxx . . $ osmo_ss7_asp#cfg.; |
| 460 | }; |
| 461 | |
| 462 | /*! Peer SG doesn't send NTFY(AS-INACTIVE) after ASP-UP procedure */ |
| 463 | #define OSMO_SS7_ASP_QUIRK_NO_NOTIFYcxx . . $ `include/osmocom/sigtran/osmo_ss7.h:463:9`! 0x00000001 |
| 464 | /*! Accept DAUD in ASP role (RFC states only permitted in ASP->SG role) */ |
| 465 | #define OSMO_SS7_ASP_QUIRK_DAUD_IN_ASPcxx . . $ `include/osmocom/sigtran/osmo_ss7.h:465:9`! 0x00000002 |
| 466 | /*! Accept SSNM even if ASP is in AS-INACTIVE state */ |
| 467 | #define OSMO_SS7_ASP_QUIRK_SNM_INACTIVEcxx . . $ `include/osmocom/sigtran/osmo_ss7.h:467:9`! 0x00000004 |
| 468 | |
| 469 | int osmo_ss7_asp_peer_snprintfcxx . . $ osmo_ss7_asp_peer_snprintf(a8a260bae3c50a56).(char* buf, size_tcxx . . $ size_t# buf_len, struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer); |
| 470 | void osmo_ss7_asp_peer_initcxx . . $ osmo_ss7_asp_peer_init(57b01763c6409352).(struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer); |
| 471 | int osmo_ss7_asp_peer_set_hostscxx . . $ osmo_ss7_asp_peer_set_hosts(4406bb236d228139).(struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer, void *talloc_ctx, |
| 472 | const char *const*hosts, size_tcxx . . $ size_t# host_cnt); |
| 473 | int osmo_ss7_asp_peer_set_hosts2cxx . . $ osmo_ss7_asp_peer_set_hosts2(25319be594fb139a).(struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer, void *talloc_ctx, |
| 474 | const char *const*hosts, size_tcxx . . $ size_t# host_cnt, int idx_primary); |
| 475 | int osmo_ss7_asp_peer_add_hostcxx . . $ osmo_ss7_asp_peer_add_host(aa5b080d8606fca).(struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer, void *talloc_ctx, const char *host); |
| 476 | int osmo_ss7_asp_peer_add_host2cxx . . $ osmo_ss7_asp_peer_add_host2(ac0aec88bf8c47fc).(struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer, void *talloc_ctx, const char *host, boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! is_primary_addr); |
| 477 | int osmo_ss7_asp_peer_del_hostcxx . . $ osmo_ss7_asp_peer_del_host(51810c1161f64837).(struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# *peer, const char *host); |
| 478 | |
| 479 | |
| 480 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# * |
| 481 | osmo_ss7_asp_find_by_namecxx . . $ osmo_ss7_asp_find_by_name(ab1f0f114a10632d).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name); |
| 482 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# * |
| 483 | osmo_ss7_asp_find_by_protocxx . . $ osmo_ss7_asp_find_by_proto(e85f12b81cc38baa).(struct osmo_ss7_ascxx . . $ osmo_ss7_as# *as, |
| 484 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto); |
| 485 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# * |
| 486 | osmo_ss7_asp_findcxx . . $ osmo_ss7_asp_find(8f9140974608268a).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name, |
| 487 | uint16_tcxx . . $ uint16_t# remote_port, uint16_tcxx . . $ uint16_t# local_port, |
| 488 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto) |
| 489 | OSMO_DEPRECATEDcxx . . $ `<external>/17927630607182120676/defs.h:37:10`!("Use osmo_ss7_asp_find2() instead"); |
| 490 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# * |
| 491 | osmo_ss7_asp_find2cxx . . $ osmo_ss7_asp_find2(79ff10f20c505805).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name, |
| 492 | uint16_tcxx . . $ uint16_t# remote_port, uint16_tcxx . . $ uint16_t# local_port, |
| 493 | int trans_proto, enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto); |
| 494 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# * |
| 495 | osmo_ss7_asp_find_or_createcxx . . $ osmo_ss7_asp_find_or_create(8f9140974608268a).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name, |
| 496 | uint16_tcxx . . $ uint16_t# remote_port, uint16_tcxx . . $ uint16_t# local_port, |
| 497 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto) |
| 498 | OSMO_DEPRECATEDcxx . . $ `<external>/17927630607182120676/defs.h:37:10`!("Use osmo_ss7_asp_find_or_create2() instead"); |
| 499 | struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# * |
| 500 | osmo_ss7_asp_find_or_create2cxx . . $ osmo_ss7_asp_find_or_create2(79ff10f20c505805).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, const char *name, |
| 501 | uint16_tcxx . . $ uint16_t# remote_port, uint16_tcxx . . $ uint16_t# local_port, |
| 502 | int trans_proto, enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto); |
| 503 | void osmo_ss7_asp_destroycxx . . $ osmo_ss7_asp_destroy(da22411590fb0bb8).(struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 504 | int osmo_ss7_asp_sendcxx . . $ osmo_ss7_asp_send(42aab3c1414fe401).(struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp, struct msgbcxx . . $ msgb# *msg); |
| 505 | int osmo_ss7_asp_restartcxx . . $ osmo_ss7_asp_restart(994bc753055ee168).(struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 506 | int osmo_ss7_asp_use_default_lmcxx . . $ osmo_ss7_asp_use_default_lm(5b58c0d96761d781).(struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp, int log_level); |
| 507 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! osmo_ss7_asp_activecxx . . $ osmo_ss7_asp_active(7aa299bfc095b8b5).(const struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 508 | int osmo_ss7_asp_get_log_subsyscxx . . $ osmo_ss7_asp_get_log_subsys(135a0be75ac356ce).(const struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 509 | const char *osmo_ss7_asp_get_namecxx . . $ osmo_ss7_asp_get_name(e6c5e030ad1511f8).(const struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 510 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# osmo_ss7_asp_get_protocxx . . $ osmo_ss7_asp_get_proto(4a445666c368c181).(const struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 511 | int osmo_ss7_asp_get_trans_protocxx . . $ osmo_ss7_asp_get_trans_proto(135a0be75ac356ce).(const struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp); |
| 512 | |
| 513 | /*! Weak function to handle payload for unknown/unsupported PPID or IPA StreamID. |
| 514 | * This function can be overridden by application code to implement whatever handling |
| 515 | * it wants for such additional payloads/streams. |
| 516 | * \param[in] asp Application Server Process through which data was received |
| 517 | * \param[in] ppid_sid SCTP PPID (in sigtran case) or IPA Stream ID |
| 518 | * \param[in] msg Message buffer containing received data. Continues to be owned by caller! |
| 519 | * \return 0 on success; negative on error */ |
| 520 | typedef int osmo_ss7_asp_rx_unknown_cbcxx . . $ osmo_ss7_asp_rx_unknown_cb#(struct osmo_ss7_aspcxx . . $ osmo_ss7_asp# *asp, int ppid_mux, struct msgbcxx . . $ msgb# *msg); |
| 521 | |
| 522 | void osmo_ss7_register_rx_unknown_cbcxx . . $ osmo_ss7_register_rx_unknown_cb(db7716482bec4c92).(osmo_ss7_asp_rx_unknown_cbcxx . . $ osmo_ss7_asp_rx_unknown_cb# *cb); |
| 523 | |
| 524 | #define _LOGSS7cxx . . $ `include/osmocom/sigtran/osmo_ss7.h:524:9`!(inst, subsys, level, fmt, args ...) \ |
| 525 | LOGPcxx . . $ `<external>/4641578727114424824/logging.h:49:9`!(subsys, level, "%u: " fmt, inst ? (inst)->cfg.id : 0, ## args) |
| 526 | #define LOGSS7cxx . . $ `include/osmocom/sigtran/osmo_ss7.h:526:9`!(inst, level, fmt, args ...) _LOGSS7(inst, DLSS7, level, fmt, ## args) |
| 527 | |
| 528 | #define LOGPASPcxx . . $ `include/osmocom/sigtran/osmo_ss7.h:528:9`!(asp, subsys, level, fmt, args ...) \ |
| 529 | _LOGSS7cxx . . $ `include/osmocom/sigtran/osmo_ss7.h:524:9`!((asp)->inst, subsys, level, "asp-%s: " fmt, (asp)->cfg.name, ## args) |
| 530 | #define LOGPAScxx . . $ `include/osmocom/sigtran/osmo_ss7.h:530:9`!(as, subsys, level, fmt, args ...) \ |
| 531 | _LOGSS7cxx . . $ `include/osmocom/sigtran/osmo_ss7.h:524:9`!((as)->inst, subsys, level, "as-%s: " fmt, (as)->cfg.name, ## args) |
| 532 | |
| 533 | /*********************************************************************** |
| 534 | * xUA Servers |
| 535 | ***********************************************************************/ |
| 536 | |
| 537 | struct osmo_xua_layer_managercxx . . $ osmo_xua_layer_manager# { |
| 538 | osmo_prim_cbcxx . . $ osmo_prim_cb# prim_cbcxx . . $ osmo_xua_layer_manager#prim_cb.; |
| 539 | }; |
| 540 | |
| 541 | struct osmo_xua_servercxx . . $ osmo_xua_server# { |
| 542 | struct llist_headcxx . . $ llist_head# listcxx . . $ osmo_xua_server#list.; |
| 543 | struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *instcxx . . $ osmo_xua_server#inst.; |
| 544 | |
| 545 | /* list of ASPs established via this server */ |
| 546 | struct llist_headcxx . . $ llist_head# asp_listcxx . . $ osmo_xua_server#asp_list.; |
| 547 | |
| 548 | struct osmo_stream_srv_linkcxx . . $ osmo_stream_srv_link# *servercxx . . $ osmo_xua_server#server.; |
| 549 | |
| 550 | structcxx . . $ osmo_xua_server#$anonymous_type_10# { |
| 551 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! accept_dyn_regcxx . . $ osmo_xua_server#$anonymous_type_10#accept_dyn_reg.; |
| 552 | struct osmo_ss7_asp_peercxx . . $ osmo_ss7_asp_peer# localcxx . . $ osmo_xua_server#$anonymous_type_10#local.; |
| 553 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# protocxx . . $ osmo_xua_server#$anonymous_type_10#proto.; |
| 554 | structcxx . . $ osmo_xua_server#$anonymous_type_10#$anonymous_type_11# { |
| 555 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! num_ostreams_presentcxx . . $ osmo_xua_server#$anonymous_type_10#$anonymous_type_11#num_ostreams_present.; |
| 556 | boolcxx . . $ `<external>/14268322491693841775/stdbool.h:36:9`! max_instreams_presentcxx . . $ osmo_xua_server#$anonymous_type_10#$anonymous_type_11#max_instreams_present.; |
| 557 | uint16_tcxx . . $ uint16_t# num_ostreams_valuecxx . . $ osmo_xua_server#$anonymous_type_10#$anonymous_type_11#num_ostreams_value.; |
| 558 | uint16_tcxx . . $ uint16_t# max_instreams_valuecxx . . $ osmo_xua_server#$anonymous_type_10#$anonymous_type_11#max_instreams_value.; |
| 559 | } sctp_initcxx . . $ osmo_xua_server#$anonymous_type_10#sctp_init.; |
| 560 | |
| 561 | /*! The underlaying transport protocol (one of IPPROTO_*) */ |
| 562 | int trans_protocxx . . $ osmo_xua_server#$anonymous_type_10#trans_proto.; |
| 563 | } cfgcxx . . $ osmo_xua_server#cfg.; |
| 564 | }; |
| 565 | |
| 566 | struct osmo_xua_servercxx . . $ osmo_xua_server# * |
| 567 | osmo_ss7_xua_server_findcxx . . $ osmo_ss7_xua_server_find(aa2c296fb848a601).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 568 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto, |
| 569 | uint16_tcxx . . $ uint16_t# local_port) |
| 570 | OSMO_DEPRECATEDcxx . . $ `<external>/17927630607182120676/defs.h:37:10`!("Use osmo_ss7_xua_server_find2() instead"); |
| 571 | struct osmo_xua_servercxx . . $ osmo_xua_server# * |
| 572 | osmo_ss7_xua_server_find2cxx . . $ osmo_ss7_xua_server_find2(60e9e60e17feea34).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 573 | int trans_proto, |
| 574 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto, |
| 575 | uint16_tcxx . . $ uint16_t# local_port); |
| 576 | |
| 577 | struct osmo_xua_servercxx . . $ osmo_xua_server# * |
| 578 | osmo_ss7_xua_server_createcxx . . $ osmo_ss7_xua_server_create(7d25011374fb98b2).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 579 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto, |
| 580 | uint16_tcxx . . $ uint16_t# local_port, const char *local_host) |
| 581 | OSMO_DEPRECATEDcxx . . $ `<external>/17927630607182120676/defs.h:37:10`!("Use osmo_ss7_xua_server_create2() instead"); |
| 582 | struct osmo_xua_servercxx . . $ osmo_xua_server# * |
| 583 | osmo_ss7_xua_server_create2cxx . . $ osmo_ss7_xua_server_create2(1492e66210b1f650).(struct osmo_ss7_instancecxx . . $ osmo_ss7_instance# *inst, |
| 584 | int trans_proto, enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# proto, |
| 585 | uint16_tcxx . . $ uint16_t# local_port, const char *local_host); |
| 586 | |
| 587 | int |
| 588 | osmo_ss7_xua_server_bindcxx . . $ osmo_ss7_xua_server_bind(719abd3eb7ceec4).(struct osmo_xua_servercxx . . $ osmo_xua_server# *xs); |
| 589 | |
| 590 | int |
| 591 | osmo_ss7_xua_server_set_local_hostcxx . . $ osmo_ss7_xua_server_set_local_host(cb32004150287866).(struct osmo_xua_servercxx . . $ osmo_xua_server# *xs, const char *local_host); |
| 592 | int |
| 593 | osmo_ss7_xua_server_set_local_hostscxx . . $ osmo_ss7_xua_server_set_local_hosts(473d29524203817c).(struct osmo_xua_servercxx . . $ osmo_xua_server# *xs, const char **local_hosts, size_tcxx . . $ size_t# local_host_cnt); |
| 594 | int osmo_ss7_xua_server_add_local_hostcxx . . $ osmo_ss7_xua_server_add_local_host(cb32004150287866).(struct osmo_xua_servercxx . . $ osmo_xua_server# *xs, const char *local_host); |
| 595 | int osmo_ss7_xua_server_del_local_hostcxx . . $ osmo_ss7_xua_server_del_local_host(cb32004150287866).(struct osmo_xua_servercxx . . $ osmo_xua_server# *xs, const char *local_host); |
| 596 | void osmo_ss7_xua_server_destroycxx . . $ osmo_ss7_xua_server_destroy(7efad241937f8ab9).(struct osmo_xua_servercxx . . $ osmo_xua_server# *xs); |
| 597 | |
| 598 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# * |
| 599 | osmo_sccp_simple_clientcxx . . $ osmo_sccp_simple_client(7d1b265a27c9a348).(void *ctx, const char *name, uint32_tcxx . . $ uint32_t# default_pc, |
| 600 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# prot, int default_local_port, |
| 601 | const char *default_local_ip, int default_remote_port, |
| 602 | const char *default_remote_ip); |
| 603 | |
| 604 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# * |
| 605 | osmo_sccp_simple_client_on_ss7_idcxx . . $ osmo_sccp_simple_client_on_ss7_id(19c6883759dfd3f).(void *ctx, uint32_tcxx . . $ uint32_t# ss7_id, const char *name, |
| 606 | uint32_tcxx . . $ uint32_t# default_pc, |
| 607 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# prot, |
| 608 | int default_local_port, |
| 609 | const char *default_local_ip, |
| 610 | int default_remote_port, |
| 611 | const char *default_remote_ip); |
| 612 | |
| 613 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# * |
| 614 | osmo_sccp_simple_servercxx . . $ osmo_sccp_simple_server(a7130c5ee73d05b2).(void *ctx, uint32_tcxx . . $ uint32_t# pc, |
| 615 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# prot, int local_port, |
| 616 | const char *local_ip); |
| 617 | |
| 618 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# * |
| 619 | osmo_sccp_simple_server_on_ss7_idcxx . . $ osmo_sccp_simple_server_on_ss7_id(cf1af173f8316de1).(void *ctx, uint32_tcxx . . $ uint32_t# ss7_id, uint32_tcxx . . $ uint32_t# pc, |
| 620 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# prot, |
| 621 | int local_port, const char *local_ip); |
| 622 | |
| 623 | struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# * |
| 624 | osmo_sccp_simple_server_add_clntcxx . . $ osmo_sccp_simple_server_add_clnt(7dd64d0915cb9190).(struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# *inst, |
| 625 | enum osmo_ss7_asp_protocolcxx . . $ osmo_ss7_asp_protocol# prot, |
| 626 | const char *name, uint32_tcxx . . $ uint32_t# pc, |
| 627 | int local_port, int remote_port, |
| 628 | const char *remote_ip); |
| 629 | |
| 630 | void osmo_sccp_set_max_optional_datacxx . . $ osmo_sccp_set_max_optional_data(e97b602a29ce2d61).(struct osmo_sccp_instancecxx . . $ osmo_sccp_instance# *inst, int val); |
| 631 | |
| 632 | enum osmo_ss7_as_traffic_modecxx . . $ osmo_ss7_as_traffic_mode# osmo_ss7_tmode_from_xuacxx . . $ osmo_ss7_tmode_from_xua(e2f8738ca9a29592).(uint32_tcxx . . $ uint32_t# in); |
| 633 | int osmo_ss7_tmode_to_xuacxx . . $ osmo_ss7_tmode_to_xua(6124145943e2bac0).(enum osmo_ss7_as_traffic_modecxx . . $ osmo_ss7_as_traffic_mode# tmod); |
| 634 | |
| 635 | /* VTY related */ |
| 636 | struct vtycxx . . $ vty#; |
| 637 | void osmo_ss7_vty_init_aspcxx . . $ osmo_ss7_vty_init_asp(5d22bdacc48458e8).(void *ctx); |
| 638 | void osmo_ss7_vty_init_sgcxx . . $ osmo_ss7_vty_init_sg(5d22bdacc48458e8).(void *ctx); |
| 639 | int osmo_ss7_vty_go_parentcxx . . $ osmo_ss7_vty_go_parent(e008645b530bc335).(struct vtycxx . . $ vty# *vty); |
| 640 | int osmo_ss7_is_config_nodecxx . . $ osmo_ss7_is_config_node(d37f2b52bd003392).(struct vtycxx . . $ vty# *vty, int node); |