Played around a bit, but realised the job was too much for me.<br>I have decided to use some of the tools readily available and execute them when required.<br>tcpdump being one of the tools, if run with the
<b>-c</b>
flag, it will capture packets until it is interrupted by a SIGINT or
SIGTERM signal or the specified number of packets have been processed.<br>Is there a way I can fork tcpdump as a seperate process and kill it when required?<br><br><div class="gmail_quote">2010/1/6 lloyd thomas <span dir="ltr"><<a href="mailto:lloydie.t@googlemail.com">lloydie.t@googlemail.com</a>></span><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">OK I think I know the reason why 'ansichar'<br>Just did a bit of code to list the net adaptors in a combobox and All I get is symbols (??? and ?@?). I think I read somewhere Windows may save adaptor names in unicode since windows 2000 (maybe).<br>
<br>procedure TForm1.FormCreate(Sender: TObject);<br>begin<br>Fzniffer := TZniffer.create;<br> Combobox1.Items.assign(Fzniffer.Adapters);<br>end;<br><br><br><br><div class="gmail_quote">2010/1/6 Marco van de Voort <span dir="ltr"><<a href="mailto:marcov@stack.nl" target="_blank">marcov@stack.nl</a>></span><div>
<div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div>In our previous episode, lloyd thomas said:<br>
> I have managed to get the zniffer wrapper to compile, but I am worried that<br>
> using {$MODE delphi} may not be the best way to produce optimized code.<br>
<br>
</div>No problem. fpc modes are mostly about syntax, not optimization. If the code<br>
is delphi in origin it is definitely the best solution.<br>
<div><br>
> Also I have seen other libpcap where they use ansichar instead of char. Is<br>
> there a reason for this?<br>
<br>
</div>Yes, D2009 and later where char<>ansichar but char=widechar.<br>
<br>
IOW sb updated that piece for D2009+<br>
<div><div></div><div><br>
_______________________________________________<br>
fpc-pascal maillist - <a href="mailto:fpc-pascal@lists.freepascal.org" target="_blank">fpc-pascal@lists.freepascal.org</a><br>
<a href="http://lists.freepascal.org/mailman/listinfo/fpc-pascal" target="_blank">http://lists.freepascal.org/mailman/listinfo/fpc-pascal</a><br>
</div></div></blockquote></div></div></div><br>
</blockquote></div><br>