\doxysection{ipa.\+h}
\label{ipa_8h_source}\index{include/osmocom/gsm/ipa.h@{include/osmocom/gsm/ipa.h}}
\textbf{ Go to the documentation of this file.}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{3 \textcolor{preprocessor}{\#pragma once}}
\DoxyCodeLine{4 }
\DoxyCodeLine{5 \textcolor{preprocessor}{\#include <stdint.h>}}
\DoxyCodeLine{6 }
\DoxyCodeLine{7 \textcolor{preprocessor}{\#include <osmocom/core/msgb.h>}}
\DoxyCodeLine{8 \textcolor{preprocessor}{\#include <osmocom/gsm/tlv.h>}}
\DoxyCodeLine{9 }
\DoxyCodeLine{10 \textcolor{keyword}{struct }osmo\_fd;}
\DoxyCodeLine{11 }
\DoxyCodeLine{12 \textcolor{comment}{/* internal (host-\/only) data structure */}}
\DoxyCodeLine{13 \textcolor{keyword}{struct }ipaccess\_unit \{}
\DoxyCodeLine{14         uint16\_t site\_id;}
\DoxyCodeLine{15         uint16\_t bts\_id;}
\DoxyCodeLine{16         uint16\_t trx\_id;}
\DoxyCodeLine{17         \textcolor{keywordtype}{char} *unit\_name;}
\DoxyCodeLine{18         \textcolor{keywordtype}{char} *equipvers;}
\DoxyCodeLine{19         \textcolor{keywordtype}{char} *swversion;}
\DoxyCodeLine{20         uint8\_t mac\_addr[6];}
\DoxyCodeLine{21         \textcolor{keywordtype}{char} *location1;}
\DoxyCodeLine{22         \textcolor{keywordtype}{char} *location2;}
\DoxyCodeLine{23         \textcolor{keywordtype}{char} *serno;}
\DoxyCodeLine{24 \};}
\DoxyCodeLine{25 }
\DoxyCodeLine{26 \textcolor{comment}{/* obtain the human-\/readable name of an IPA CCM ID TAG */}}
\DoxyCodeLine{27 \textcolor{keyword}{const} \textcolor{keywordtype}{char} *ipa\_ccm\_idtag\_name(uint8\_t tag);}
\DoxyCodeLine{28 }
\DoxyCodeLine{29 \textcolor{keywordtype}{int} ipa\_ccm\_idtag\_parse(\textcolor{keyword}{struct} tlv\_parsed *dec, \textcolor{keywordtype}{unsigned} \textcolor{keywordtype}{char} *buf, \textcolor{keywordtype}{int} len)}
\DoxyCodeLine{30         OSMO\_DEPRECATED("{}Use ipa\_ccm\_id\_\{get,resp\}\_parse instead\textcolor{stringliteral}{"{});}}
\DoxyCodeLine{31 \textcolor{stringliteral}{int ipa\_ccm\_idtag\_parse\_off(struct tlv\_parsed *dec, unsigned char *buf, int len, const int len\_offset)}}
\DoxyCodeLine{32 \textcolor{stringliteral}{        OSMO\_DEPRECATED\_OUTSIDE("{}}Use ipa\_ccm\_id\_\{get,resp\}\_parse instead\textcolor{stringliteral}{"{});}}
\DoxyCodeLine{33 \textcolor{stringliteral}{}}
\DoxyCodeLine{34 \textcolor{stringliteral}{/* parse payload of IPA CCM ID GET into a osmocom TLV style representation */}}
\DoxyCodeLine{35 \textcolor{stringliteral}{int ipa\_ccm\_id\_get\_parse(struct tlv\_parsed *dec, const uint8\_t *buf, unsigned int len);}}
\DoxyCodeLine{36 \textcolor{stringliteral}{}}
\DoxyCodeLine{37 \textcolor{stringliteral}{/* parse payload of IPA CCM ID RESP into a osmocom TLV style representation */}}
\DoxyCodeLine{38 \textcolor{stringliteral}{int ipa\_ccm\_id\_resp\_parse(struct tlv\_parsed *dec, const uint8\_t *buf, unsigned int len);}}
\DoxyCodeLine{39 \textcolor{stringliteral}{}}
\DoxyCodeLine{40 \textcolor{stringliteral}{/* parse an Unit ID in string format into the 'ipaccess\_unit' data structure */}}
\DoxyCodeLine{41 \textcolor{stringliteral}{int ipa\_parse\_unitid(const char *str, struct ipaccess\_unit *unit\_data);}}
\DoxyCodeLine{42 \textcolor{stringliteral}{}}
\DoxyCodeLine{43 \textcolor{stringliteral}{/* fill a 'struct ipaccess\_unit' based on a parsed IDTAG TLV */}}
\DoxyCodeLine{44 \textcolor{stringliteral}{int ipa\_ccm\_tlv\_to\_unitdata(struct ipaccess\_unit *ud,}}
\DoxyCodeLine{45 \textcolor{stringliteral}{                             const struct tlv\_parsed *tp);}}
\DoxyCodeLine{46 \textcolor{stringliteral}{}}
\DoxyCodeLine{47 \textcolor{stringliteral}{}}
\DoxyCodeLine{48 \textcolor{stringliteral}{struct msgb *ipa\_ccm\_make\_id\_resp(const struct ipaccess\_unit *dev,}}
\DoxyCodeLine{49 \textcolor{stringliteral}{                                  const uint8\_t *ies\_req, unsigned int num\_ies\_req);}}
\DoxyCodeLine{50 \textcolor{stringliteral}{}}
\DoxyCodeLine{51 \textcolor{stringliteral}{struct msgb *ipa\_ccm\_make\_id\_resp\_from\_req(const struct ipaccess\_unit *dev,}}
\DoxyCodeLine{52 \textcolor{stringliteral}{                                           const uint8\_t *data, unsigned int len);}}
\DoxyCodeLine{53 \textcolor{stringliteral}{}}
\DoxyCodeLine{54 \textcolor{stringliteral}{/* Send an IPA message to the given FD */}}
\DoxyCodeLine{55 \textcolor{stringliteral}{int ipa\_send(int fd, const void *msg, size\_t msglen);}}
\DoxyCodeLine{56 \textcolor{stringliteral}{}}
\DoxyCodeLine{57 \textcolor{stringliteral}{/* Send an IPA CCM PONG via the given FD */}}
\DoxyCodeLine{58 \textcolor{stringliteral}{int ipa\_ccm\_send\_pong(int fd);}}
\DoxyCodeLine{59 \textcolor{stringliteral}{}}
\DoxyCodeLine{60 \textcolor{stringliteral}{/* Send an IPA CCM ID\_ACK via the given FD */}}
\DoxyCodeLine{61 \textcolor{stringliteral}{int ipa\_ccm\_send\_id\_ack(int fd);}}
\DoxyCodeLine{62 \textcolor{stringliteral}{}}
\DoxyCodeLine{63 \textcolor{stringliteral}{/* Send an IPA CCM ID\_REQ via the given FD */}}
\DoxyCodeLine{64 \textcolor{stringliteral}{int ipa\_ccm\_send\_id\_req(int fd);}}
\DoxyCodeLine{65 \textcolor{stringliteral}{}}
\DoxyCodeLine{66 \textcolor{stringliteral}{/* Common handling of IPA CCM, BSC side */}}
\DoxyCodeLine{67 \textcolor{stringliteral}{int ipa\_ccm\_rcvmsg\_base(struct msgb *msg, struct osmo\_fd *bfd);}}
\DoxyCodeLine{68 \textcolor{stringliteral}{}}
\DoxyCodeLine{69 \textcolor{stringliteral}{/* Common handling of IPA CCM, BTS side */}}
\DoxyCodeLine{70 \textcolor{stringliteral}{int ipa\_ccm\_rcvmsg\_bts\_base(struct msgb *msg, struct osmo\_fd *bfd);}}
\DoxyCodeLine{71 \textcolor{stringliteral}{}}
\DoxyCodeLine{72 \textcolor{stringliteral}{/* prepend (push) an ipaccess\_head\_ext to the msgb */}}
\DoxyCodeLine{73 \textcolor{stringliteral}{void ipa\_prepend\_header\_ext(struct msgb *msg, int proto);}}
\DoxyCodeLine{74 \textcolor{stringliteral}{}}
\DoxyCodeLine{75 \textcolor{stringliteral}{/* prepend (push) an ipaccess\_head to the msgb */}}
\DoxyCodeLine{76 \textcolor{stringliteral}{void ipa\_prepend\_header(struct msgb *msg, int proto);}}
\DoxyCodeLine{77 \textcolor{stringliteral}{}}
\DoxyCodeLine{78 \textcolor{stringliteral}{struct msgb *ipa\_msg\_alloc(int headroom);}}
\DoxyCodeLine{79 \textcolor{stringliteral}{}}
\DoxyCodeLine{80 \textcolor{stringliteral}{int ipa\_msg\_recv(int fd, struct msgb **rmsg);}}
\DoxyCodeLine{81 \textcolor{stringliteral}{int ipa\_msg\_recv\_buffered(int fd, struct msgb **rmsg, struct msgb **tmp\_msg);}}

\end{DoxyCode}
