From 95308596540b0733a43d9db5dc6ab0c4f5e2d08f Mon Sep 17 00:00:00 2001 From: Max Date: Tue, 24 Oct 2017 15:54:28 +0200 Subject: GPRS: clarify ip/frgre union use * add comment about underlying assumption that structs in ip/frgre union members in gprs_nsvc struct have the same memory layout * remove such assumption from gprs_ns_ll_str() * use gprs_ns_ll_str() for NSE dump Change-Id: Idcb912b7b3f7460fd2b058e16650c0bde8f757ee --- include/osmocom/gprs/gprs_ns.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'include') diff --git a/include/osmocom/gprs/gprs_ns.h b/include/osmocom/gprs/gprs_ns.h index 2d2f86ed..4fb9f584 100644 --- a/include/osmocom/gprs/gprs_ns.h +++ b/include/osmocom/gprs/gprs_ns.h @@ -140,6 +140,8 @@ struct gprs_nsvc { /*! which link-layer are we based on? */ enum gprs_ns_ll ll; + /*! make sure to always keep bts_addr as first struct member to not break the assumption + that those structs are similar */ union { struct { struct sockaddr_in bts_addr; -- cgit v1.2.3