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/.
laforge gerrit-no-reply at lists.osmocom.orglaforge has uploaded this change for review. ( https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/19805 ) Change subject: ipa_proto: Add support for Osmocom Extended Stream IDs ...................................................................... ipa_proto: Add support for Osmocom Extended Stream IDs IPAC_PROTO_OSMO reserves one StreamID and creates a new hierarchy of 256 different Osmocom specifice stream Identifiers. It adds one extra byte for this (the first byte in the payload). Change-Id: I765e0d96523feec401d6fb04693189281c580d04 --- M src/ipa_proto.erl 1 file changed, 12 insertions(+), 4 deletions(-) git pull ssh://gerrit.osmocom.org:29418/erlang/osmo_ss7 refs/changes/05/19805/1 diff --git a/src/ipa_proto.erl b/src/ipa_proto.erl index 2d851e3..c191a74 100644 --- a/src/ipa_proto.erl +++ b/src/ipa_proto.erl @@ -1,6 +1,6 @@ % ip.access IPA multiplex protocol -% (C) 2010 by Harald Welte <laforge at gnumonks.org> +% (C) 2010,2012,2019 by Harald Welte <laforge at gnumonks.org> % (C) 2010 by On-Waves % % All Rights Reserved @@ -32,6 +32,9 @@ -define(IPAC_MSGT_ID_RESP, 5). -define(IPAC_MSGT_ID_ACK, 6). +-define(IPAC_PROTO_OSMO, 238). +-define(IPAC_PROTO_CCM, 254). + -export([register_socket/1, register_stream/3, unregister_stream/2, send/3, connect/3, connect/4, listen_accept_handle/2, start_listen/3, controlling_process/3]). @@ -136,8 +139,11 @@ process_rx_ipa_msg(S, StreamMap, Data) -> {StreamID, PayloadBin, Trailer} = split_ipa_msg(Data), case StreamID of - 254 -> + ?IPAC_PROTO_CCM -> process_rx_ccm_msg(S, StreamID, PayloadBin); + ?IPAC_PROTO_OSMO -> + <<ExtStreamID:8, PayloadExt/binary>> = PayloadBin, + deliver_rx_ipa_msg(S, {osmo, ExtStreamID}, StreamMap, PayloadExt); _ -> deliver_rx_ipa_msg(S, StreamID, StreamMap, PayloadBin) end, @@ -166,8 +172,10 @@ ok. % send a binary message through a given Socket / StreamID +send(Socket, {osmo, StreamIdExt}, DataBin) -> + send(Socket, ?IPAC_PROTO_OSMO, [StreamIdExt, DataBin]); send(Socket, StreamID, DataBin) -> - Size = byte_size(DataBin), + Size = iolist_size(DataBin), gen_tcp:send(Socket, iolist_to_binary([<<Size:2/big-unsigned-integer-unit:8>>, StreamID, DataBin])). @@ -244,7 +252,7 @@ process_ccm_msg(Socket, StreamID, MsgType, Opts). send_ccm_id_get(Socket) -> - send(Socket, 254, <<?IPAC_MSGT_ID_GET>>). + send(Socket, ?IPAC_PROTO_CCM, <<?IPAC_MSGT_ID_GET>>). % convenience wrapper for interactive use / debugging from the shell listen_accept_handle(LPort, Opts) -> -- To view, visit https://gerrit.osmocom.org/c/erlang/osmo_ss7/+/19805 To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings Gerrit-Project: erlang/osmo_ss7 Gerrit-Branch: master Gerrit-Change-Id: I765e0d96523feec401d6fb04693189281c580d04 Gerrit-Change-Number: 19805 Gerrit-PatchSet: 1 Gerrit-Owner: laforge <laforge at osmocom.org> Gerrit-MessageType: newchange -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20200825/7b0e73aa/attachment.htm>