\doxysection{bssgp\+\_\+bvc\+\_\+fsm.\+h}
\label{bssgp__bvc__fsm_8h_source}\index{include/osmocom/gprs/bssgp\_bvc\_fsm.h@{include/osmocom/gprs/bssgp\_bvc\_fsm.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{2 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{3 }
\DoxyCodeLine{4 \textcolor{keyword}{struct }gprs\_ns2\_inst;}
\DoxyCodeLine{5 \textcolor{keyword}{struct }osmo\_fsm\_inst;}
\DoxyCodeLine{6 \textcolor{keyword}{struct }gprs\_ra\_id;}
\DoxyCodeLine{7 \textcolor{keyword}{struct }bssgp2\_flow\_ctrl;}
\DoxyCodeLine{8 }
\DoxyCodeLine{9 \textcolor{keyword}{enum} bssp\_ptp\_bvc\_fsm\_state \{}
\DoxyCodeLine{10         BSSGP\_BVCFSM\_S\_NULL,}
\DoxyCodeLine{11         BSSGP\_BVCFSM\_S\_BLOCKED,}
\DoxyCodeLine{12         BSSGP\_BVCFSM\_S\_WAIT\_RESET\_ACK,}
\DoxyCodeLine{13         BSSGP\_BVCFSM\_S\_UNBLOCKED,}
\DoxyCodeLine{14 \};}
\DoxyCodeLine{15 }
\DoxyCodeLine{16 \textcolor{keyword}{enum} bssgp\_ptp\_bvc\_fsm\_event \{}
\DoxyCodeLine{17         \textcolor{comment}{/* Rx of BSSGP PDUs from the remote side; 'data' is 'struct tlv\_parsed', and}}
\DoxyCodeLine{18 \textcolor{comment}{         * the assumption is that the caller has already validated all mandatory IEs}}
\DoxyCodeLine{19 \textcolor{comment}{         * are present and of sufficient length */}}
\DoxyCodeLine{20         BSSGP\_BVCFSM\_E\_RX\_BLOCK,}
\DoxyCodeLine{21         BSSGP\_BVCFSM\_E\_RX\_BLOCK\_ACK,}
\DoxyCodeLine{22         BSSGP\_BVCFSM\_E\_RX\_UNBLOCK,}
\DoxyCodeLine{23         BSSGP\_BVCFSM\_E\_RX\_UNBLOCK\_ACK,}
\DoxyCodeLine{24         BSSGP\_BVCFSM\_E\_RX\_RESET,}
\DoxyCodeLine{25         BSSGP\_BVCFSM\_E\_RX\_RESET\_ACK,}
\DoxyCodeLine{26         BSSGP\_BVCFSM\_E\_RX\_FC\_BVC,}
\DoxyCodeLine{27         BSSGP\_BVCFSM\_E\_RX\_FC\_BVC\_ACK,}
\DoxyCodeLine{28         \textcolor{comment}{/* Requests of the local user */}}
\DoxyCodeLine{29         BSSGP\_BVCFSM\_E\_REQ\_BLOCK,       \textcolor{comment}{/* data: uint8\_t *cause */}}
\DoxyCodeLine{30         BSSGP\_BVCFSM\_E\_REQ\_UNBLOCK,}
\DoxyCodeLine{31         BSSGP\_BVCFSM\_E\_REQ\_RESET,       \textcolor{comment}{/* data: uint8\_t *cause */}}
\DoxyCodeLine{32         BSSGP\_BVCFSM\_E\_REQ\_FC\_BVC,     \textcolor{comment}{/* data: struct bssgp2\_flow\_ctrl */}}
\DoxyCodeLine{33 \};}
\DoxyCodeLine{34 }
\DoxyCodeLine{35 \textcolor{keyword}{struct }bssgp\_bvc\_fsm\_ops \{}
\DoxyCodeLine{36         \textcolor{comment}{/* call-\/back notifying the user of a state change */}}
\DoxyCodeLine{37         void (*state\_chg\_notification)(uint16\_t nsei, uint16\_t bvci, \textcolor{keywordtype}{int} old\_state, \textcolor{keywordtype}{int} new\_state,}
\DoxyCodeLine{38                                         \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{39         \textcolor{comment}{/* call-\/back notifying the user of a BVC-\/RESET event */}}
\DoxyCodeLine{40         void (*reset\_notification)(uint16\_t nsei, uint16\_t bvci, \textcolor{keyword}{const} \textcolor{keyword}{struct }gprs\_ra\_id *ra\_id,}
\DoxyCodeLine{41                                    uint16\_t cell\_id, uint8\_t cause, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{42         void (*rx\_fc\_bvc)(uint16\_t nsei, uint16\_t bvci, \textcolor{keyword}{const} \textcolor{keyword}{struct }bssgp2\_flow\_ctrl *fc, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{43         void (*reset\_ack\_notification)(uint16\_t nsei, uint16\_t bvci, \textcolor{keyword}{const} \textcolor{keyword}{struct }gprs\_ra\_id *ra\_id,}
\DoxyCodeLine{44                                    uint16\_t cell\_id, uint8\_t cause, \textcolor{keywordtype}{void} *priv);}
\DoxyCodeLine{45 \};}
\DoxyCodeLine{46 }
\DoxyCodeLine{47 \textcolor{keyword}{struct }osmo\_fsm\_inst *}
\DoxyCodeLine{48 bssgp\_bvc\_fsm\_alloc\_sig\_bss(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei, uint32\_t features);}
\DoxyCodeLine{49 }
\DoxyCodeLine{50 \textcolor{keyword}{struct }osmo\_fsm\_inst *}
\DoxyCodeLine{51 bssgp\_bvc\_fsm\_alloc\_ptp\_bss(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei, uint16\_t bvci,}
\DoxyCodeLine{52                             \textcolor{keyword}{const} \textcolor{keyword}{struct} gprs\_ra\_id *ra\_id, uint16\_t cell\_id);}
\DoxyCodeLine{53 }
\DoxyCodeLine{54 \textcolor{keyword}{struct }osmo\_fsm\_inst *}
\DoxyCodeLine{55 bssgp\_bvc\_fsm\_alloc\_sig\_sgsn(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei, uint32\_t features);}
\DoxyCodeLine{56 }
\DoxyCodeLine{57 \textcolor{keyword}{struct }osmo\_fsm\_inst *}
\DoxyCodeLine{58 bssgp\_bvc\_fsm\_alloc\_ptp\_sgsn(\textcolor{keywordtype}{void} *ctx, \textcolor{keyword}{struct} gprs\_ns2\_inst *nsi, uint16\_t nsei, uint16\_t bvci);}
\DoxyCodeLine{59 }
\DoxyCodeLine{60 \textcolor{keywordtype}{void} bssgp\_bvc\_fsm\_set\_ops(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi, \textcolor{keyword}{const} \textcolor{keyword}{struct} bssgp\_bvc\_fsm\_ops *ops, \textcolor{keywordtype}{void} *ops\_priv);}
\DoxyCodeLine{61 }
\DoxyCodeLine{62 \textcolor{keywordtype}{bool} bssgp\_bvc\_fsm\_is\_unblocked(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi);}
\DoxyCodeLine{63 }
\DoxyCodeLine{64 uint8\_t bssgp\_bvc\_fsm\_get\_block\_cause(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi);}
\DoxyCodeLine{65 }
\DoxyCodeLine{66 uint32\_t bssgp\_bvc\_fsm\_get\_features\_advertised(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi);}
\DoxyCodeLine{67 uint32\_t bssgp\_bvc\_fsm\_get\_features\_received(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi);}
\DoxyCodeLine{68 uint32\_t bssgp\_bvc\_fsm\_get\_features\_negotiated(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi);}
\DoxyCodeLine{69 }
\DoxyCodeLine{70 \textcolor{keywordtype}{void} bssgp\_bvc\_fsm\_set\_max\_pdu\_len(\textcolor{keyword}{struct} osmo\_fsm\_inst *fi, uint16\_t max\_pdu\_len);}
\DoxyCodeLine{71 uint16\_t bssgp\_bvc\_fsm\_get\_max\_pdu\_len(\textcolor{keyword}{const} \textcolor{keyword}{struct} osmo\_fsm\_inst *fi);}

\end{DoxyCode}
