anchor.diff:  -module(m3ua_codec).
   -author('Harald Welte <laforge@gnumonks.org>').
   -include("m3ua.hrl").
  +-include("mtp3.hrl").
   
   -export([parse_m3ua_msg/1, encode_m3ua_msg/1]).
   
  
positive.code: 	PadLen = get_num_pad_bytes(Length),
  	LengthNet = Length - 4,
  	<<CurOpt:LengthNet/binary, 0:PadLen/integer-unit:8, Remain2/binary>> = Remain,
  	parse_m3ua_opts(Remain2, OptList ++ [{Tag, CurOpt}]).
  
  encode_m3ua_msg(#m3ua_msg{version = Version, msg_class = MsgClass,
  			  msg_type = MsgType, payload = OptList}) ->
  
negative.code: 	OptBin = encode_m3ua_opt(Head),
  	encode_m3ua_opts(Tail, <<Bin/binary, OptBin/binary>>).
  
  encode_m3ua_opt({?M3UA_IEI_PROTOCOL_DATA, Mtp3}) when is_record(Mtp3, mtp3_msg) ->
  	#mtp3_msg{network_ind = Ni, service_ind = Si,
  		  routing_label = #mtp3_routing_label{sig_link_sel = Sls,
  						      origin_pc = Opc,
  						      dest_pc = Dpc},
  		  payload = Payload} = Mtp3,
  	<<Opc:32/big, Dpc:32/big, Si:8, Ni:8, 0:8, Sls:8, Payload/binary>>;
  encode_m3ua_opt({Iei, Data}) when is_integer(Iei), is_binary(Data) ->
  	Length = length(Data) + 4,
  	PadLen = get_num_pad_bytes(Length),
  