Mail Archives: cygwin/2001/03/23/09:54:40
> Hi Danny,
> Yes, you are correct. Winsock2 do support Raw Sockets for IGMP and ICMP
> protocols. Cygwin socket implementation used Win32API (I guess !!!). Is
> there any other commercial/freeware package available which fully supports
> the Raw Sockets under WIN NT4.0 ???
>
> Thanks & Regards,
> krishna
>
> RE: Raw Socket support using Cygwin.
> * To: Cygwin <cygwin at cygwin dot com>
> * Subject: RE: Raw Socket support using Cygwin.
> * From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
> * Date: Fri, 23 Mar 2001 14:12:41 +1200 (NZST)
>
> > To: "Prabhune, Abhijeet" <APrabhun at ciena dot com>,<cygwin at cygwin
> dot
> com>
> > Subject: RE: Raw Socket support using Cygwin.
> > From: "Robert Collins" <robert dot collins at itdomain dot com dot au>
> > Date: Fri, 23 Mar 2001 12:08:43 +1100
> > Thread-Index: AcCzNLmWb6XCK3qBQfygxAw1UqdU1wAAJXhw
> > Thread-Topic: Raw Socket support using Cygwin.
>
> >> -----Original Message-----
> >> From: Prabhune, Abhijeet [<mailto:APrabhun AT ciena DOT com>]
> >> Sent: Friday, March 23, 2001 12:07 PM
> >> To: 'cygwin-apps AT cygwin DOT com'
> >> Cc: 'cygwin-developers AT cygwin DOT com'
> >> Subject: Raw Socket support using Cygwin.
> >>
> >>
> >> Hi,
> >> I am developing a program which requires Raw Ip Sockets on
> >> Windows NT 4.0
> >> I know that Winsock2 provided by Microsoft does not provide
> >> this support.
>
>
> Not quite true. Under NT, both winsock1 and winsock2 do support RAW
> SOCKETS,
> but only to administrators.
>
> The executable from this code (extract from a ping programme) produces
> error=0
> when run by administrator, but error code 10013 (WSAEACCES) when run by
> non-admin:
>
> #include <winsock.h>
> #include <stdio.h>
>
> SOCKET icmp_open(void) {
> SOCKET s = socket (AF_INET, SOCK_RAW , IPPROTO_ICMP);
> printf("socket(type=SOCK_RAW, protocol=IPROTO_ICMP), Error code: %d \n",
>
> WSAGetLastError());
> if (s == SOCKET_ERROR) {
> return (INVALID_SOCKET);
> }
> return (s);
> }
>
> int main(){
> WSADATA wsaData;
> SOCKET a;
> if (WSAStartup(MAKEWORD(1, 1), &wsaData) != 0)
> return 255;
> a=icmp_open();
> WSACleanup();
> return 0;
> }
>
> Danny
>
> __________________________________________________________________________
> ___
> <http://calendar.yahoo.com.au> - Yahoo! Calendar
> - Access your appointments and meetings online.
>
> --
> Want to unsubscribe from this list?
> Check out: http://cygwin.com/ml/#unsubscribe-simple
> <http://cygwin.com/ml/>
>
>
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple
- Raw text -