Nmap Security Scanner
*Intro
*Ref Guide
*Install Guide
*Download
*Changelog
*Book
*Docs
Security Lists
*Nmap Hackers
*Nmap Dev
*Bugtraq
*Full Disclosure
*Pen Test
*Basics
*More
Security Tools
*Pass crackers
*Sniffers
*Vuln Scanners
*Web scanners
*Wireless
*Exploitation
*Packet crafters
*More
Site News
Site Search:
Exploit World
Advertising
About/Contact
Credits
Sponsors:




firewall-wizards logo Firewall Wizards mailing list archives

Re: Code reviews [Was: FWTK and smap/smapd]
From: ark () eltex ru
Date: Tue, 23 Jul 2002 04:21:02 +0400 (MSD)

nuqneH,

It depends on what the maximum buflen is, isn't it?

If we have a small buffer that we know does fit send queue we may
assume that if write count is not equal to expected size something
wrong happens with the socket and we may shut the connection down
diagnosing network error, am i wrong?

If the buffer size can really grow that much we need something like
net_write, sure.

YOU (Carson Gaspar) WROTE:

 Nowadays, I have far lower expectations. I have now interviewed dozens of 
 "UNIX network programmers", and have had _one_ person ever get this 
 interview question correct (taken from a fwtk bug, btw):
 
 Given a buffer char *buf, a buffer length unsigned int buflen, and a 
 connected TCP session on file descriptor fd, write the buffer to the file 
 descriptor correctly, including error checking.
 
 And no, I didn't count syntax errors against them. All I wanted was 2 
 pieces of symantic understanding to be present. Only one person got both of 
 them. Two people got one of the 2. The rest failed miserably.
 
 (Oh, and if you want the answer, I suggest you read the late Stevens' UNIX 
 Network Programming, and look at net_write().)


-- 
                                     _     _  _  _  _      _  _
 {::} {::} {::}  CU in Hell          _| o |_ | | _|| |   / _||_|   |_ |_ |_
 (##) (##) (##)        /Arkan#iD    |_  o  _||_| _||_| /   _|  | o |_||_||_|
 [||] [||] [||]            Do i believe in Bible? Hell,man,i've seen one!
_______________________________________________
firewall-wizards mailing list
firewall-wizards () honor icsalabs com
http://honor.icsalabs.com/mailman/listinfo/firewall-wizards


  By Date           By Thread  

Current thread:
[ Nmap | Sec Tools | Mailing Lists | Site News | About/Contact | Advertising | Privacy ]