diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2020-07-28 13:47:18 +0200 |
---|---|---|
committer | Vadim Yanitskiy <vyanitskiy@sysmocom.de> | 2020-09-22 00:49:28 +0700 |
commit | 9b5c960f5550df72db5b9391a3c264f7786f3898 (patch) | |
tree | 03090dc8e4559e230a3bcbd39b9186168fddd1c0 /include | |
parent | 8e2bd1e79d1f5e5e3341a76044fe443dad3f2722 (diff) |
pcuif_proto: version 10: 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: Ia0852f9f4395f1248b39363ef90f6f5673b24e2f
Related: SYS#4915
Diffstat (limited to 'include')
-rw-r--r-- | include/osmocom/pcu/pcuif_proto.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/osmocom/pcu/pcuif_proto.h b/include/osmocom/pcu/pcuif_proto.h index 61c63af6..82d761d5 100644 --- a/include/osmocom/pcu/pcuif_proto.h +++ b/include/osmocom/pcu/pcuif_proto.h @@ -2,6 +2,7 @@ #define _PCUIF_PROTO_H #include <osmocom/gsm/l1sap.h> +#include <arpa/inet.h> #define PCU_SOCK_DEFAULT "/tmp/pcu_bts" @@ -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, @@ -164,7 +170,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 { |