aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-07-28 13:42:01 +0200
committerlynxis lazus <lynxis@fe80.eu>2020-09-15 23:37:55 +0000
commitdf93a448b7638f51786236fcabaa6246ebe4ff94 (patch)
treebfa83fc31f8d0ae57bc91aa5edd19bb54cd76225 /include
parent2ff4592ffc78649bb5c14a213a74569b43da255b (diff)
pcuif_proto: version 0xa: add support for IPv6 NSVCs
Introduce a address_type in the NSVC configuration pass the given protocol. The remote_ip is network byte order, the default encoding for in_addr and in6_addr. Change-Id: I4067b1af041b2cdad60d6fb16c9caee98bc218dd
Diffstat (limited to 'include')
-rw-r--r--include/osmo-bts/pcuif_proto.h14
1 files changed, 12 insertions, 2 deletions
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index e9779149..30449c54 100644
--- a/include/osmo-bts/pcuif_proto.h
+++ b/include/osmo-bts/pcuif_proto.h
@@ -2,10 +2,11 @@
#define _PCUIF_PROTO_H
#include <osmocom/gsm/l1sap.h>
+#include <arpa/inet.h>
#define PCU_SOCK_DEFAULT "/tmp/pcu_bts"
-#define PCU_IF_VERSION 0x09
+#define PCU_IF_VERSION 0x0a
#define TXT_MAX_LEN 128
/* msg_type */
@@ -50,6 +51,11 @@
#define PCU_IF_FLAG_MCS8 (1 << 27)
#define PCU_IF_FLAG_MCS9 (1 << 28)
+/* NSVC address type */
+#define PCU_IF_ADDR_TYPE_UNSPEC 0x00 /* No address - empty entry */
+#define PCU_IF_ADDR_TYPE_IPV4 0x04 /* IPv4 address */
+#define PCU_IF_ADDR_TYPE_IPV6 0x29 /* IPv6 address */
+
enum gsm_pcu_if_text_type {
PCU_VERSION,
PCU_OML_ALERT,
@@ -155,7 +161,11 @@ struct gsm_pcu_if_info_ind {
uint16_t nsvci[2];
uint16_t local_port[2];
uint16_t remote_port[2];
- uint32_t remote_ip[2];
+ uint8_t address_type[2];
+ union {
+ struct in_addr v4;
+ struct in6_addr v6;
+ } remote_ip[2];
} __attribute__ ((packed));
struct gsm_pcu_if_act_req {