\doxysection{ss7\+\_\+asp.\+h}
\label{ss7__asp_8h_source}\index{src/ss7\_asp.h@{src/ss7\_asp.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{4 \textcolor{preprocessor}{\#include <osmocom/core/linuxlist.h>}}
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <osmocom/core/fsm.h>}}
\DoxyCodeLine{6 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/core/tdef.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/netif/stream.h>}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/sigtran/osmo\_ss7.h>}}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{preprocessor}{\#include "{}ss7\_asp\_peer.h"{}}}
\DoxyCodeLine{13 \textcolor{preprocessor}{\#include "{}ss7\_internal.h"{}}}
\DoxyCodeLine{14 }
\DoxyCodeLine{15 \textcolor{comment}{/***********************************************************************}}
\DoxyCodeLine{16 \textcolor{comment}{ * SS7 Application Server Processes}}
\DoxyCodeLine{17 \textcolor{comment}{ ***********************************************************************/}}
\DoxyCodeLine{18 }
\DoxyCodeLine{19 \textcolor{keyword}{struct }osmo\_ss7\_instance;}
\DoxyCodeLine{20 \textcolor{keyword}{struct }osmo\_xua\_layer\_manager;}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 \textcolor{keyword}{enum} ss7\_asp\_ctr \{}
\DoxyCodeLine{23         SS7\_ASP\_CTR\_PKT\_RX\_TOTAL,}
\DoxyCodeLine{24         SS7\_ASP\_CTR\_PKT\_RX\_UNKNOWN,}
\DoxyCodeLine{25         SS7\_ASP\_CTR\_PKT\_TX\_TOTAL,}
\DoxyCodeLine{26 \};}
\DoxyCodeLine{27 }
\DoxyCodeLine{28 \textcolor{keyword}{struct }osmo\_ss7\_asp \{}
\DoxyCodeLine{30         \textcolor{keyword}{struct }llist\_head list;}
\DoxyCodeLine{31         \textcolor{keyword}{struct }osmo\_ss7\_instance *inst;}
\DoxyCodeLine{32 }
\DoxyCodeLine{34         \textcolor{keyword}{struct }osmo\_fsm\_inst *fi;}
\DoxyCodeLine{35 }
\DoxyCodeLine{37         \textcolor{keyword}{struct }osmo\_xua\_server *xua\_server;}
\DoxyCodeLine{38         \textcolor{keyword}{struct }llist\_head siblings;}
\DoxyCodeLine{39 }
\DoxyCodeLine{41         \textcolor{keyword}{struct }osmo\_stream\_cli *client;}
\DoxyCodeLine{42         \textcolor{keyword}{struct }osmo\_stream\_srv *server;}
\DoxyCodeLine{44         \textcolor{keywordtype}{char} *sock\_name;}
\DoxyCodeLine{45 }
\DoxyCodeLine{46         \textcolor{comment}{/* ASP Identifier for ASP-\/UP + NTFY */}}
\DoxyCodeLine{47         uint32\_t asp\_id;}
\DoxyCodeLine{48         \textcolor{keywordtype}{bool} asp\_id\_present;}
\DoxyCodeLine{49 }
\DoxyCodeLine{50         \textcolor{comment}{/* Layer Manager to which we talk */}}
\DoxyCodeLine{51         \textcolor{keyword}{const} \textcolor{keyword}{struct }osmo\_xua\_layer\_manager *lm;}
\DoxyCodeLine{52         \textcolor{keywordtype}{void} *lm\_priv;}
\DoxyCodeLine{53 }
\DoxyCodeLine{55         \textcolor{keywordtype}{bool} dyn\_allocated;}
\DoxyCodeLine{56 }
\DoxyCodeLine{58         \textcolor{keywordtype}{bool} simple\_client\_allocated;}
\DoxyCodeLine{59 }
\DoxyCodeLine{61         \textcolor{keyword}{struct }rate\_ctr\_group *ctrg;}
\DoxyCodeLine{62 }
\DoxyCodeLine{64         \textcolor{keyword}{struct }msgb *pending\_msg;}
\DoxyCodeLine{65 }
\DoxyCodeLine{66         \textcolor{keyword}{struct }\{}
\DoxyCodeLine{67                 \textcolor{keywordtype}{char} *name;}
\DoxyCodeLine{68                 \textcolor{keywordtype}{char} *description;}
\DoxyCodeLine{69                 \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto;}
\DoxyCodeLine{70                 \textcolor{keyword}{enum} osmo\_ss7\_asp\_admin\_state adm\_state;}
\DoxyCodeLine{71                 \textcolor{keywordtype}{bool} is\_server;}
\DoxyCodeLine{72                 \textcolor{keyword}{enum} osmo\_ss7\_asp\_role role;}
\DoxyCodeLine{73                 \textcolor{keywordtype}{bool} role\_set\_by\_vty;}
\DoxyCodeLine{74                 \textcolor{keywordtype}{bool} trans\_role\_set\_by\_vty;}
\DoxyCodeLine{75 }
\DoxyCodeLine{76                 \textcolor{keyword}{struct }osmo\_ss7\_asp\_peer local;}
\DoxyCodeLine{77                 \textcolor{keyword}{struct }osmo\_ss7\_asp\_peer remote;}
\DoxyCodeLine{78                 uint8\_t qos\_class;}
\DoxyCodeLine{79                 uint32\_t quirks;}
\DoxyCodeLine{80 }
\DoxyCodeLine{81                 \textcolor{comment}{/* T\_defs used by the default\_lm: */}}
\DoxyCodeLine{82                 \textcolor{keyword}{struct }osmo\_tdef *T\_defs\_lm;}
\DoxyCodeLine{83 }
\DoxyCodeLine{84                 \textcolor{keyword}{struct }\{}
\DoxyCodeLine{85                         \textcolor{keywordtype}{bool} num\_ostreams\_present;}
\DoxyCodeLine{86                         \textcolor{keywordtype}{bool} max\_instreams\_present;}
\DoxyCodeLine{87                         \textcolor{keywordtype}{bool} max\_attempts\_present;}
\DoxyCodeLine{88                         \textcolor{keywordtype}{bool} max\_init\_timeo\_present;}
\DoxyCodeLine{89                         uint16\_t num\_ostreams\_value;}
\DoxyCodeLine{90                         uint16\_t max\_instreams\_value;}
\DoxyCodeLine{91                         uint16\_t max\_attempts\_value;}
\DoxyCodeLine{92                         uint16\_t max\_init\_timeo\_value; \textcolor{comment}{/* ms */}}
\DoxyCodeLine{93                 \} sctp\_init;}
\DoxyCodeLine{94 }
\DoxyCodeLine{96                 \textcolor{keywordtype}{int} trans\_proto;}
\DoxyCodeLine{97         \} cfg;}
\DoxyCodeLine{98 \};}
\DoxyCodeLine{99 }
\DoxyCodeLine{100 \textcolor{keyword}{struct }osmo\_ss7\_asp *ss7\_asp\_alloc(\textcolor{keyword}{struct} osmo\_ss7\_instance *inst, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *name,}
\DoxyCodeLine{101                                    uint16\_t remote\_port, uint16\_t local\_port,}
\DoxyCodeLine{102                                    \textcolor{keywordtype}{int} trans\_proto, \textcolor{keyword}{enum} osmo\_ss7\_asp\_protocol proto);}
\DoxyCodeLine{103 \textcolor{keywordtype}{bool} ss7\_asp\_set\_default\_peer\_hosts(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{104 \textcolor{keywordtype}{bool} ss7\_asp\_is\_started(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{105 \textcolor{keywordtype}{int} ss7\_asp\_get\_fd(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{106 \textcolor{keywordtype}{int} ss7\_asp\_disconnect\_stream(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{107 }
\DoxyCodeLine{108 \textcolor{keywordtype}{int} ss7\_asp\_apply\_peer\_primary\_address(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{109 \textcolor{keywordtype}{int} ss7\_asp\_apply\_primary\_address(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{110 \textcolor{keywordtype}{int} ss7\_asp\_apply\_new\_local\_address(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} loc\_idx);}
\DoxyCodeLine{111 \textcolor{keywordtype}{int} ss7\_asp\_apply\_drop\_local\_address(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_ss7\_asp *asp, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{int} loc\_idx);}
\DoxyCodeLine{112 }
\DoxyCodeLine{113 \textcolor{keywordtype}{void} ss7\_asp\_restart\_after\_reconfigure(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{114 \textcolor{keywordtype}{void} osmo\_ss7\_asp\_remove\_default\_lm(\textcolor{keyword}{struct} osmo\_ss7\_asp *asp);}
\DoxyCodeLine{115 }
\DoxyCodeLine{116 \textcolor{preprocessor}{\#define LOGPASP(asp, subsys, level, fmt, args ...) \(\backslash\)}}
\DoxyCodeLine{117 \textcolor{preprocessor}{        \_LOGSS7((asp)-\/>inst, subsys, level, "{}ASP(\%s) "{}} fmt, (asp)-\/>cfg.name, \#\# args)}

\end{DoxyCode}
