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

This is a Digital Library

With over 100,000 free electronic resource in Persian, Arabic and English

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

Mike D. Schiffman

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

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

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







Psuedo-Random Number Functions

These functions implement the libnet pseudo-random number interface.



int libnet_seed_prand(libnet_t *1);


libnet_seed_prand() seeds libnet's pseudo-random number generator with a call to gettimeofday(), which provides more entropy than time(). Upon success, the function returns 1; upon failure, the function returns -1 and libnet_geterror() tells you that gettimeofday() failed.



u_long libnet_get_prand(int type);


libnet_get_prand() returns a positive pseudo-random number within the range specified in type, as summarized in Table 3.55.


























































Table 3.55: libnet_get_prand() type Symbolic Constants

CONSTANT


MEANING





LIBNET_PR2


0-1





LIBNET_PR8


0-255





LIBNET_PR16


0 - 32767





LIBNET_PRu16


0 - 65535





LIBNET_PR32


0 - 2147483647





LIBNET_PRu32


0 - 4294967295







/ 135