This is merely a historical archive of years 2008-2021, before the migration to mailman3.
A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.
lynxis lazus gerrit-no-reply at lists.osmocom.orglynxis lazus has uploaded this change for review. ( https://gerrit.osmocom.org/c/osmo-bts/+/19418 )
Change subject: pcuif_proto: version 0xa: add support for NSVC IPv6 support
......................................................................
pcuif_proto: version 0xa: add support for NSVC IPv6 support
Introduce a remote_proto to define the given protocol.
IPPROTO is more universal than address_family and is defined by an RFC.
IPPROTO_IPIP is used for IPv4, IPPROTO_IPV6 for IPv6. 0 means unset or
unused entry.
The remote_ip is network byte order, the default encoding for in_addr and in6_addr.
Change-Id: I4067b1af041b2cdad60d6fb16c9caee98bc218dd
---
M include/osmo-bts/pcuif_proto.h
M src/common/pcu_sock.c
2 files changed, 11 insertions(+), 3 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/18/19418/1
diff --git a/include/osmo-bts/pcuif_proto.h b/include/osmo-bts/pcuif_proto.h
index e977914..9e3b801 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 */
@@ -155,7 +156,13 @@
uint16_t nsvci[2];
uint16_t local_port[2];
uint16_t remote_port[2];
- uint32_t remote_ip[2];
+ /* use IP PROTOCOL instead of address_family, because address_family is
+ * OS dependent. IPIP => v4, IPV6 => v6, 0 => unused */
+ uint8_t remote_proto[2];
+ union {
+ struct in_addr ipv4;
+ struct in6_addr ipv6;
+ } remote_ip[2];
} __attribute__ ((packed));
struct gsm_pcu_if_act_req {
diff --git a/src/common/pcu_sock.c b/src/common/pcu_sock.c
index 5fa0e19..a983d88 100644
--- a/src/common/pcu_sock.c
+++ b/src/common/pcu_sock.c
@@ -210,7 +210,8 @@
info_ind->nsvci[i] = nsvc->nsvci;
info_ind->local_port[i] = nsvc->local_port;
info_ind->remote_port[i] = nsvc->remote_port;
- info_ind->remote_ip[i] = nsvc->remote_ip;
+ info_ind->remote_ip[i].ipv4.s_addr = htonl(nsvc->remote_ip);
+ info_ind->remote_proto[i] = IPPROTO_IPIP;
}
for (i = 0; i < 8; i++) {
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/19418
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I4067b1af041b2cdad60d6fb16c9caee98bc218dd
Gerrit-Change-Number: 19418
Gerrit-PatchSet: 1
Gerrit-Owner: lynxis lazus <lynxis at fe80.eu>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200728/553aeb30/attachment.htm>