Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
libnetを使用しているプログラムを使用していますが、使用するたびにlibnetがパケットの送信に失敗します。
具体的には、失敗する関数はlibnet_write_ipです。呼び出しごとに-1を返します。
それを引き起こす可能性のあるアイデアはありますか?私はMacOSX10.6.4を使用しています
よろしくお願いします!
libnet_write_ip への呼び出しの後に次の行を追加します。システム自体が機能障害の原因を教えてくれることを願っています。
perror("libnet_write_ip");
libnet マニュアルによると、libnet_write_* 関数は内部使用専用です。使用する必要があるのは libnet_write() です。この関数は、libnet_build_* 関数を呼び出した後にパケットを書き込みます。