Linux-Bulgaria.ORG
навигация

 

начало

пощенски списък

архив на групата

семинари ...

документи

как да ...

 

 

Предишно писмо Следващо писмо Предишно по тема Следващо по тема По Дата По тема (thread)

Re: lug-bg: IP_HDRINCL, SOCK_RAW


  • Subject: Re: lug-bg: IP_HDRINCL, SOCK_RAW
  • From: close_forever@xxxxxxxxx (skk)
  • Date: Thu, 12 Aug 1999 06:41:51 -0700 (PDT)



WinSocks ima zalojen SOCK_RAW!!! 

W MSND ima podrobni opisania na towa kak se
inicializira socket w SOCK_RAW rejim, kak mu se
promeniat opciite, wkluchitelno i IP_HDRINCL (za
nezapoznatite towa e flag, kojto pokazwa che packeta,
kojto izprashtame sudurja IP headera w sebe si e ne e
neobhodimo da go generira i zakacha kum nego
awtomatichno). Ochewidno e obache che ne wsichki
applicationi imat priwiliegii da promeniat tezi opcii.

Waprosut mi e kak da promenia statusa na
applicationa-a, za da moga da izpolzwam WSICHKI
funkcii na winsock i ne samo winsock ami i kernel i
t.n.

btw, za tezi, kojto ne wiarwat che windows moje da
raboti w RAW rejim e slednata chast ot source:

...
if (WSAStartup(MAKEWORD(2,1),&wsaData) != 0)
{ //on error go to hell :)))
};
SOCKET sockRaw = WSASocket(AF_INET, SOCK_RAW,
IPPROTO_ICMP, NULL,0,0);
if (sockRaw == INVALID_SOCKET) 
{ //on error go to hell :)))
};
BOOL value;
if
(setsockopt(sockRaw,IPPROTO_IP,IP_HDRINC,(char*)&value,
sizeof(value)) == SOCKET_ERROR) 
{ // tuk winagi dawa greshka!!!
  // probwah i s drugite opcii - niakoj sushto
  // nemogat da se promeniat, no drugi mogat :(((((((
}
....

moga da izpratia pulnia compiliruem cod na programkata
na wseki, kojto se zainteresuwa
_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

==================================================================
A mail-list of Linux Users Group - Bulgaria (bulgarian linuxers)
For more send to lug-bg-request@xxxxxxxxxxxx a single word 'info'
==================================================================



 

наши приятели

 

линукс за българи
http://linux-bg.org

FSA-BG
http://fsa-bg.org

OpenFest
http://openfest.org

FreeBSD BG
http://bg-freebsd.org

KDE-BG
http://kde.fsa-bg.org/

Gnome-BG
http://gnome.cult.bg/

проект OpenFMI
http://openfmi.net

NetField Forum
http://netField.ludost.net/forum/

 

 

Linux-Bulgaria.ORG

Mailing list messages are © Copyright their authors.