Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <20010323021241.5478.qmail@web6404.mail.yahoo.com> Date: Fri, 23 Mar 2001 14:12:41 +1200 (NZST) From: =?iso-8859-1?q?Danny=20Smith?= Subject: RE: Raw Socket support using Cygwin. To: Cygwin MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit > To: "Prabhune, Abhijeet" , > Subject: RE: Raw Socket support using Cygwin. > From: "Robert Collins" > 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 #include 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