Building.Open.Source.Network.Security.Tools.Components.And.Techniques [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Building.Open.Source.Network.Security.Tools.Components.And.Techniques [Electronic resources] - نسخه متنی

Mike D. Schiffman

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Advanced-Mode Functions

In order to provide additional power and flexibility, libnet exports an advanced interface to seasoned application programmers. While at the time of writing this interface was still in development, it effectively affords the application programmer more control over the state machine and packet logic that is internal to libnet. Some additional functionality is enabled internally, and all of the libnet_adv() functions are accessible as well (which are otherwise inaccessible). As some of the advanced features are more complicated and could result in program crashes, this mode is not recommended for novice programmers.



int libnet_adv_cull_packet(libnet_t *1, u_char **packet,
u_long *packet_s);


libnet_adv_cull_packet() reaches into the innards of libnet and pulls out the current packet referenced by 1 and writes it to packet and its length to packet_s. The function runs through the internal packet chain list and puts the packet together and computes any outstanding checksums. Upon success the function returns 1; upon failure the function returns -1 and libnet_geterror() can tell you why.



int libnet_adv_write_link(libnet_t *1, u_char *packet, u_long
packet_s);


libnet_adv_write_link() writes a fully completed wire-ready packet contained in packet to the network. The packet should be packet_s bytes long and 1 should refer to an already instantiated libnet session. This function allows the application programmer to obviate the packet creation logic inside of libnet and write his own packets to the wire. Upon success the function returns the number of bytes written; upon failure the function returns -1 and libnet_geterror() can tell you why.

/ 135