diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-03-22 03:25:11 +0100 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2010-03-24 06:16:04 +0100 |
commit | 22481bf76d129d3c41d20b96b6587ef085be485b (patch) | |
tree | 8c8de852e945dd5422a83bc7e0c37548d2911fe2 /openbsc/include/sccp | |
parent | b973955295b720b8ba7c556d0165750ed9bfb381 (diff) | |
parent | 61b4232c6363ff9d78ef73b9dbf47ec16c94d610 (diff) |
Merge remote branch 'origin/master' into on-waves/bsc-master
* Move to libosmocore
* Move to new debugging architecture
* Register the BTS types
* Has only been compile tested
Conflicts:
openbsc/include/openbsc/Makefile.am
openbsc/include/openbsc/gsm_data.h
openbsc/include/openbsc/ipaccess.h
openbsc/include/openbsc/mgcp.h
openbsc/include/openbsc/msgb.h
openbsc/include/openbsc/tlv.h
openbsc/src/Makefile.am
openbsc/src/abis_rsl.c
openbsc/src/bsc_init.c
openbsc/src/bsc_mgcp.c
openbsc/src/chan_alloc.c
openbsc/src/debug.c
openbsc/src/gsm_subscriber_base.c
openbsc/src/msgb.c
openbsc/src/rest_octets.c
openbsc/src/sccp/sccp.c
openbsc/src/vty/command.c
openbsc/src/vty_interface.c
openbsc/tests/Makefile.am
Diffstat (limited to 'openbsc/include/sccp')
-rw-r--r-- | openbsc/include/sccp/Makefile.am | 3 | ||||
-rw-r--r-- | openbsc/include/sccp/sccp.h | 4 | ||||
-rw-r--r-- | openbsc/include/sccp/sccp_types.h | 20 |
3 files changed, 24 insertions, 3 deletions
diff --git a/openbsc/include/sccp/Makefile.am b/openbsc/include/sccp/Makefile.am index 42fd31047..6c8a51714 100644 --- a/openbsc/include/sccp/Makefile.am +++ b/openbsc/include/sccp/Makefile.am @@ -1 +1,2 @@ -noinst_HEADERS = sccp_types.h sccp.h +sccp_HEADERS = sccp_types.h sccp.h +sccpdir = $(includedir)/sccp diff --git a/openbsc/include/sccp/sccp.h b/openbsc/include/sccp/sccp.h index e5e8b819c..643479adc 100644 --- a/openbsc/include/sccp/sccp.h +++ b/openbsc/include/sccp/sccp.h @@ -27,11 +27,11 @@ #include <stdlib.h> #include <sys/socket.h> - -#include <openbsc/msgb.h> +#include <sys/types.h> #include "sccp_types.h" +struct msgb; struct sccp_system; enum { diff --git a/openbsc/include/sccp/sccp_types.h b/openbsc/include/sccp/sccp_types.h index 9310a6bf0..42fda96ae 100644 --- a/openbsc/include/sccp/sccp_types.h +++ b/openbsc/include/sccp/sccp_types.h @@ -24,6 +24,8 @@ #ifndef SCCP_TYPES_H #define SCCP_TYPES_H +#include <endian.h> + /* Table 1/Q.713 - SCCP message types */ enum sccp_message_types { SCCP_MSG_TYPE_CR = 1, @@ -87,11 +89,19 @@ enum { }; struct sccp_called_party_address { +#if __BYTE_ORDER == __LITTLE_ENDIAN u_int8_t point_code_indicator : 1, ssn_indicator : 1, global_title_indicator : 4, routing_indicator : 1, reserved : 1; +#elif __BYTE_ORDER == __BIG_ENDIAN + u_int8_t reserved : 1, + routing_indicator : 1, + global_title_indicator : 4, + ssn_indicator : 1, + point_code_indicator : 1; +#endif u_int8_t data[0]; } __attribute__((packed)); @@ -100,8 +110,13 @@ struct sccp_called_party_address { /* Figure 6/Q.713 */ struct sccp_signalling_point_code { u_int8_t lsb; +#if __BYTE_ORDER == __LITTLE_ENDIAN u_int8_t msb : 6, reserved : 2; +#elif __BYTE_ORDER == __BIG_ENDIAN + u_int8_t reserved : 2, + msb : 6; +#endif } __attribute__((packed)); /* SSN == subsystem number */ @@ -137,8 +152,13 @@ enum { }; struct sccp_global_title { +#if __BYTE_ORDER == __LITTLE_ENDIAN u_int8_t nature_of_addr_ind : 7, odd_even : 1; +#elif __BYTE_ORDER == __BIG_ENDIAN + u_int8_t odd_even : 1, + nature_of_addr_ind : 7; +#endif u_int8_t data[0]; } __attribute__((packed)); |