From e391996947f9aa2b42377c4b797eda7db4f78c5c Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Wed, 20 Aug 2014 22:28:23 +0200 Subject: ipa: rename functions for consistency As we are breaking builds by moving functions from libosmo-abis to libosmocore anyway, we might as well give functions more appropriate names. ipaccess is a company, while IPA is the multiplex protocol, and CCM is the protocol used for establishing identities on the IPA multiplex. --- include/osmocom/gsm/ipa.h | 62 ++++++++++++++++++++++++++++++++++++++++++ include/osmocom/gsm/ipaccess.h | 62 ------------------------------------------ 2 files changed, 62 insertions(+), 62 deletions(-) create mode 100644 include/osmocom/gsm/ipa.h delete mode 100644 include/osmocom/gsm/ipaccess.h (limited to 'include/osmocom/gsm') diff --git a/include/osmocom/gsm/ipa.h b/include/osmocom/gsm/ipa.h new file mode 100644 index 00000000..2878676f --- /dev/null +++ b/include/osmocom/gsm/ipa.h @@ -0,0 +1,62 @@ +#pragma once + +#include + +#include +#include + +/* internal (host-only) data structure */ +struct ipaccess_unit { + uint16_t site_id; + uint16_t bts_id; + uint16_t trx_id; + char *unit_name; + char *equipvers; + char *swversion; + uint8_t mac_addr[6]; + char *location1; + char *location2; + char *serno; +}; + +/* obtain the human-readable name of an IPA CCM ID TAG */ +const char *ipa_ccm_idtag_name(uint8_t tag); + +/* parse a buffer of ID tags into a osmocom TLV style representation */ +int ipa_ccm_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len); + +/* parse an Unit ID in string format into the 'ipaccess_unit' data structure */ +int ipa_parse_unitid(const char *str, struct ipaccess_unit *unit_data); + +/* fill a 'struct ipaccess_unit' based on a parsed IDTAG TLV */ +int ipa_ccm_tlv_to_unitdata(struct ipaccess_unit *ud, + const struct tlv_parsed *tp); + +/* Send an IPA message to the given FD */ +int ipa_send(int fd, const void *msg, size_t msglen); + +/* Send an IPA CCM PONG via the given FD */ +int ipa_ccm_send_pong(int fd); + +/* Send an IPA CCM ID_ACK via the given FD */ +int ipa_ccm_send_id_ack(int fd); + +/* Send an IPA CCM ID_REQ via the given FD */ +int ipa_ccm_send_id_req(int fd); + +/* Common handling of IPA CCM, BSC side */ +int ipa_ccm_rcvmsg_base(struct msgb *msg, struct osmo_fd *bfd); + +/* Common handling of IPA CCM, BTS side */ +int ipa_ccm_rcvmsg_bts_base(struct msgb *msg, struct osmo_fd *bfd); + +/* prepend (push) an ipaccess_head_ext to the msgb */ +void ipa_prepend_header_ext(struct msgb *msg, int proto); + +/* prepend (push) an ipaccess_head to the msgb */ +void ipa_prepend_header(struct msgb *msg, int proto); + +struct msgb *ipa_msg_alloc(int headroom); + +int ipa_msg_recv(int fd, struct msgb **rmsg); +int ipa_msg_recv_buffered(int fd, struct msgb **rmsg, struct msgb **tmp_msg); diff --git a/include/osmocom/gsm/ipaccess.h b/include/osmocom/gsm/ipaccess.h deleted file mode 100644 index dd560698..00000000 --- a/include/osmocom/gsm/ipaccess.h +++ /dev/null @@ -1,62 +0,0 @@ -#pragma once - -#include - -#include -#include - -/* internal (host-only) data structure */ -struct ipaccess_unit { - uint16_t site_id; - uint16_t bts_id; - uint16_t trx_id; - char *unit_name; - char *equipvers; - char *swversion; - uint8_t mac_addr[6]; - char *location1; - char *location2; - char *serno; -}; - -/* obtain the human-readable name of an IPA CCM ID TAG */ -const char *ipaccess_idtag_name(uint8_t tag); - -/* parse a buffer of ID tags into a osmocom TLV style representation */ -int ipaccess_idtag_parse(struct tlv_parsed *dec, unsigned char *buf, int len); - -/* parse an Unit ID in string format into the 'ipaccess_unit' data structure */ -int ipaccess_parse_unitid(const char *str, struct ipaccess_unit *unit_data); - -/* fill a 'struct ipaccess_unit' based on a parsed IDTAG TLV */ -int ipaccess_tlv_to_unitdata(struct ipaccess_unit *ud, - const struct tlv_parsed *tp); - -/* Send an IPA message to the given FD */ -int ipaccess_send(int fd, const void *msg, size_t msglen); - -/* Send an IPA CCM PONG via the given FD */ -int ipaccess_send_pong(int fd); - -/* Send an IPA CCM ID_ACK via the given FD */ -int ipaccess_send_id_ack(int fd); - -/* Send an IPA CCM ID_REQ via the given FD */ -int ipaccess_send_id_req(int fd); - -/* Common handling of IPA CCM, BSC side */ -int ipaccess_rcvmsg_base(struct msgb *msg, struct osmo_fd *bfd); - -/* Common handling of IPA CCM, BTS side */ -int ipaccess_rcvmsg_bts_base(struct msgb *msg, struct osmo_fd *bfd); - -/* prepend (push) an ipaccess_head_ext to the msgb */ -void ipaccess_prepend_header_ext(struct msgb *msg, int proto); - -/* prepend (push) an ipaccess_head to the msgb */ -void ipaccess_prepend_header(struct msgb *msg, int proto); - -struct msgb *ipa_msg_alloc(int headroom); - -int ipa_msg_recv(int fd, struct msgb **rmsg); -int ipa_msg_recv_buffered(int fd, struct msgb **rmsg, struct msgb **tmp_msg); -- cgit v1.2.3