\doxysection{gsm\+\_\+08\+\_\+16.\+h}
\label{gsm__08__16_8h_source}\index{include/osmocom/gprs/protocol/gsm\_08\_16.h@{include/osmocom/gprs/protocol/gsm\_08\_16.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{6 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{7 }
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{9 \textcolor{preprocessor}{\#include <arpa/inet.h>}}
\DoxyCodeLine{10 \textcolor{preprocessor}{\#include <osmocom/core/utils.h>}}
\DoxyCodeLine{11 }
\DoxyCodeLine{17 \textcolor{keyword}{struct }gprs\_ns\_hdr \{}
\DoxyCodeLine{18         uint8\_t pdu\_type;       }
\DoxyCodeLine{19         uint8\_t data[0];    }
\DoxyCodeLine{20 \} \_\_attribute\_\_((packed));}
\DoxyCodeLine{21 }
\DoxyCodeLine{22 }
\DoxyCodeLine{24 \textcolor{keyword}{struct }gprs\_ns\_ie\_ip4\_elem \{}
\DoxyCodeLine{25         uint32\_t ip\_addr;}
\DoxyCodeLine{26         uint16\_t udp\_port;}
\DoxyCodeLine{27         uint8\_t sig\_weight;}
\DoxyCodeLine{28         uint8\_t data\_weight;}
\DoxyCodeLine{29 \} \_\_attribute\_\_ ((packed));}
\DoxyCodeLine{30 }
\DoxyCodeLine{32 \textcolor{keyword}{struct }gprs\_ns\_ie\_ip6\_elem \{}
\DoxyCodeLine{33         \textcolor{keyword}{struct }in6\_addr ip\_addr;}
\DoxyCodeLine{34         uint16\_t udp\_port;}
\DoxyCodeLine{35         uint8\_t sig\_weight;}
\DoxyCodeLine{36         uint8\_t data\_weight;}
\DoxyCodeLine{37 \} \_\_attribute\_\_ ((packed));}
\DoxyCodeLine{38 }
\DoxyCodeLine{39 \textcolor{keyword}{extern} \textcolor{keyword}{const} \textcolor{keyword}{struct }value\_string gprs\_ns\_pdu\_strings[];}
\DoxyCodeLine{40 }
\DoxyCodeLine{42 \textcolor{keyword}{enum} ns\_pdu\_type \{}
\DoxyCodeLine{43         NS\_PDUT\_UNITDATA        = 0x00,}
\DoxyCodeLine{44         NS\_PDUT\_RESET              = 0x02,}
\DoxyCodeLine{45         NS\_PDUT\_RESET\_ACK      = 0x03,}
\DoxyCodeLine{46         NS\_PDUT\_BLOCK              = 0x04,}
\DoxyCodeLine{47         NS\_PDUT\_BLOCK\_ACK      = 0x05,}
\DoxyCodeLine{48         NS\_PDUT\_UNBLOCK          = 0x06,}
\DoxyCodeLine{49         NS\_PDUT\_UNBLOCK\_ACK  = 0x07,}
\DoxyCodeLine{50         NS\_PDUT\_STATUS            = 0x08,}
\DoxyCodeLine{51         NS\_PDUT\_ALIVE              = 0x0a,}
\DoxyCodeLine{52         NS\_PDUT\_ALIVE\_ACK      = 0x0b,}
\DoxyCodeLine{53         \textcolor{comment}{/* TS 48.016 Section 10.3.7, Table 10.3.7.1 */}}
\DoxyCodeLine{54         SNS\_PDUT\_ACK                = 0x0c,}
\DoxyCodeLine{55         SNS\_PDUT\_ADD                = 0x0d,}
\DoxyCodeLine{56         SNS\_PDUT\_CHANGE\_WEIGHT    = 0x0e,}
\DoxyCodeLine{57         SNS\_PDUT\_CONFIG          = 0x0f,}
\DoxyCodeLine{58         SNS\_PDUT\_CONFIG\_ACK  = 0x10,}
\DoxyCodeLine{59         SNS\_PDUT\_DELETE          = 0x11,}
\DoxyCodeLine{60         SNS\_PDUT\_SIZE              = 0x12,}
\DoxyCodeLine{61         SNS\_PDUT\_SIZE\_ACK      = 0x13,}
\DoxyCodeLine{62 \};}
\DoxyCodeLine{63 }
\DoxyCodeLine{65 \textcolor{keyword}{enum} ns\_ctrl\_ie \{}
\DoxyCodeLine{66         NS\_IE\_CAUSE          = 0x00,}
\DoxyCodeLine{67         NS\_IE\_VCI              = 0x01,}
\DoxyCodeLine{68         NS\_IE\_PDU              = 0x02,}
\DoxyCodeLine{69         NS\_IE\_BVCI            = 0x03,}
\DoxyCodeLine{70         NS\_IE\_NSEI            = 0x04,}
\DoxyCodeLine{71         \textcolor{comment}{/* TS 48.016 Section 10.3, Table 10.3.1 */}}
\DoxyCodeLine{72         NS\_IE\_IPv4\_LIST          = 0x05,}
\DoxyCodeLine{73         NS\_IE\_IPv6\_LIST          = 0x06,}
\DoxyCodeLine{74         NS\_IE\_MAX\_NR\_NSVC      = 0x07,}
\DoxyCodeLine{75         NS\_IE\_IPv4\_EP\_NR        = 0x08,}
\DoxyCodeLine{76         NS\_IE\_IPv6\_EP\_NR        = 0x09,}
\DoxyCodeLine{77         NS\_IE\_RESET\_FLAG        = 0x0a,}
\DoxyCodeLine{78         NS\_IE\_IP\_ADDR              = 0x0b,}
\DoxyCodeLine{79         NS\_IE\_TRANS\_ID            = 0xff, \textcolor{comment}{/* osmocom. Spec has this IE but without IEI! */}}
\DoxyCodeLine{80 \};}
\DoxyCodeLine{81 }
\DoxyCodeLine{83 \textcolor{keyword}{enum} ns\_cause \{}
\DoxyCodeLine{84         NS\_CAUSE\_TRANSIT\_FAIL              = 0x00,}
\DoxyCodeLine{85         NS\_CAUSE\_OM\_INTERVENTION        = 0x01,}
\DoxyCodeLine{86         NS\_CAUSE\_EQUIP\_FAIL          = 0x02,}
\DoxyCodeLine{87         NS\_CAUSE\_NSVC\_BLOCKED              = 0x03,}
\DoxyCodeLine{88         NS\_CAUSE\_NSVC\_UNKNOWN              = 0x04,}
\DoxyCodeLine{89         NS\_CAUSE\_BVCI\_UNKNOWN              = 0x05,}
\DoxyCodeLine{90         NS\_CAUSE\_SEM\_INCORR\_PDU          = 0x08,}
\DoxyCodeLine{91         NS\_CAUSE\_PDU\_INCOMP\_PSTATE    = 0x0a,}
\DoxyCodeLine{92         NS\_CAUSE\_PROTO\_ERR\_UNSPEC      = 0x0b,}
\DoxyCodeLine{93         NS\_CAUSE\_INVAL\_ESSENT\_IE        = 0x0c,}
\DoxyCodeLine{94         NS\_CAUSE\_MISSING\_ESSENT\_IE    = 0x0d,}
\DoxyCodeLine{95         \textcolor{comment}{/* TS 48.016 Section 10.3.2, Table 10.3.2.1 */}}
\DoxyCodeLine{96         NS\_CAUSE\_INVAL\_NR\_IPv4\_EP      = 0x0e,}
\DoxyCodeLine{97         NS\_CAUSE\_INVAL\_NR\_IPv6\_EP      = 0x0f,}
\DoxyCodeLine{98         NS\_CAUSE\_INVAL\_NR\_NS\_VC          = 0x10,}
\DoxyCodeLine{99         NS\_CAUSE\_INVAL\_WEIGH                = 0x11,}
\DoxyCodeLine{100         NS\_CAUSE\_UNKN\_IP\_EP          = 0x12,}
\DoxyCodeLine{101         NS\_CAUSE\_UNKN\_IP\_ADDR              = 0x13,}
\DoxyCodeLine{102         NS\_CAUSE\_UNKN\_IP\_TEST\_FAILED        = 0x14,}
\DoxyCodeLine{103 \};}

\end{DoxyCode}
