<div dir="ltr">Hello all,<div>I have read that helpers in conntrack would give us the opportunity to pars the packets up to application layer. I want to pars the SIP packet, so I decided to use the SIP conntrack helper;which is nf_conntrack_sip. Unlike the functionality the helper itself gives, I want to find the SIP messages of type MESSAGE and read the request line of the packet. SO I add the following code into the line 256.</div><div><br></div><div><p class="gmail-MsoPlainText" style="direction:ltr;unicode-bidi:embed"><span style="font-family:"Courier New"">char sub[mlen+1]<span lang="AR-SA" dir="RTL">;</span></span><span lang="FA" dir="RTL" style="font-family:"Courier New""><br>
</span><span lang="AR-SA" dir="RTL" style="font-family:"Courier New""> </span><span style="font-family:"Courier New"">memcpy(sub,&limit[0],
mlen)<span dir="RTL"></span><span dir="RTL"></span><span lang="AR-SA" dir="RTL"><span dir="RTL"></span><span dir="RTL"></span>)</span><br>
<span lang="AR-SA" dir="RTL"> </span>sub[mlen]='\0<span dir="RTL"></span><span dir="RTL"></span><span lang="AR-SA" dir="RTL"><span dir="RTL"></span><span dir="RTL"></span>';</span><span dir="LTR"></span><span dir="LTR"></span><span dir="LTR"></span><span dir="LTR"></span><br>
<span lang="AR-SA" dir="RTL"> </span>printk(KERN_ALERT
"method is:[%s]", sub);<br>
</span></p><p class="gmail-MsoPlainText" style="direction:ltr;unicode-bidi:embed"><span style="font-family:"Courier New""><br></span></p><p class="gmail-MsoPlainText" style="unicode-bidi:embed"><span style="font-family:"Courier New"">But the problem is, nothing is being printed. My question is, Can I use nf_conntrack_sip for my purpose? and if yes, what is wrong with my code?</span></p><p class="gmail-MsoPlainText" style="unicode-bidi:embed"><span style="font-family:"Courier New"">Thanks in advance.</span></p></div></div>