<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2900.2963" name=GENERATOR></HEAD>
<BODY>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2>hi,</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>here is one issue
that stopped me today:</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>sometimes l3 message
headers includes protocol header: see struct gsm48_imm_ass</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>and sometimes it is
just the information element part: see struct
gsm48_loc_upd_req</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>since i work with
layer 3 messages, i need a uniform way to define these headers. i will add new
headers for messages i implement to gsm_04_08.h.</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>therefore i need a
decision. i prefer that </FONT></SPAN><SPAN class=780241018-10032010><FONT
face=Arial size=2>the headers (like gsm48_imm_ass or
gsm48_loc_upd_req) consists of the information elements parts only. i
must put gsm48_hdr in front of it whenever i create a l3 message. when parsing
that message, i must skip the information element part in the decoding
function. when creating the message, i always add the l3 header (with it's
content) and the information elements.</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>creation would look
like this</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2> struct msgb *msg =
gsm48_msgb_alloc();<BR> struct
gsm48_hdr *gh = (struct gsm48_hdr *) msgb_put(msg,
sizeof(*gh));<BR> struct gsm48_imm_ass
*ia = (struct gsm48_imm_ass *) msgb_put(msg, sizeof(*ia))</FONT></SPAN><SPAN
class=780241018-10032010><FONT face=Arial size=2>;<BR></FONT> </SPAN></DIV>
<DIV><SPAN class=780241018-10032010>
<FONT face=Arial size=2>gh->protocol = ....</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010>
<FONT face=Arial size=2>gh->msg_type = ....</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>parsing would look
like this:</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2> struct gsm48_hdr *gh =
msgb_l3(msg);</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2> struct gsm48_imm_ass *ia
= gh->data;<BR> unsigned int
payload_len = msgb_l3len(msg) - sizeof(*gh) - sizeof(ia);</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2> tlv_parse(&tp,
&rsl_att_tlvdef, ia->data, payload_len, 0, 0);</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>note: payload_len is
where the TLV part of the information elements start.</DIV>
<DIV><BR></DIV></FONT></SPAN>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial size=2>any
suggestions?</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2>andreas</FONT></SPAN></DIV>
<DIV><SPAN class=780241018-10032010><FONT face=Arial
size=2></FONT></SPAN> </DIV></BODY></HTML>