Ok, thank you.<br>But to open the output file, the function pcap_open_offline needs a parameter of type <a target="_blank" class="el" href="http://mail.yahoo.com/config/login?/cid:1992940774:/ym/fr/ShowLetter?box=Inbox&MsgId=8012_363486_392583_2465_4413_0_19240_24333_4129488035&bodyPart=2.2&YY=33709&order=down&sort=date&pos=0&view=a&head=b&Idx=0">pcap_t</a> *. The documentation says that this structure is returned by pcap_open_offline().<br> So is it the result of the pcap_open_offline() used to open the input file? It is strange to use the input file to open the output file!<br><br><b><i>Guy Harris <guy@alum.mit.edu></i></b> a écrit :<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> sebastien wrote:<br><br>> I want to write an apllication that write packets from a winpcap file, <br>> modify the packets and then save the modify packets in
another file.<br><br>I assume you meant "read packets from a winpcap file, modify the packets <br>and then save the modified packets in another file".<br><br>> I have only found how to save packets captured from an interface. Is it <br>> possible to save modified packets?<br><br>Yes.<br><br>> Can you give me an idea how I can do this?<br><br>You'd open the input file with pcap_open_offline() or pcap_open() <br>(rather than opening an interface with pcap_open_live() or pcap_open()), <br>open the output file with pcap_dump_open(), read from the input file, <br>modify the packet contents, and then write them with pcap_dump().<br><br>I.e., it's not that different from saving packets captured from an <br>interface; the only difference is that you open a capture file rather <br>than an interface.<br>_________________<br></blockquote><br><p> 
                <hr size="1">
Découvrez un nouveau moyen de poser toutes vos questions quelque soit le sujet !
Yahoo! Questions/Réponses pour partager vos connaissances, vos opinions et vos expériences. <a href="http://fr.rd.yahoo.com/evt=42054/*http://fr.answers.yahoo.com">Cliquez ici</a>.