Networking with C

July 5, 2009 at 04:32:32
Specs: Windows XP, CPU
What is the use of sys/socket.h and netinet/in.h header files? What functions will they include?

See More: Networking with C

Report •


#1
July 5, 2009 at 05:57:36
Those header files are way too big to go through all the functions in a post. Here's the first 10% of in.h

#ifndef _NETINET_IN_H_
#define _NETINET_IN_H_

#include <sys/cdefs.h>
#include <sys/_types.h>
#include <machine/endian.h>

/* Protocols common to RFC 1700, POSIX, and X/Open. */
#define IPPROTO_IP 0 /* dummy for IP */
#define IPPROTO_ICMP 1 /* control message protocol */
#define IPPROTO_TCP 6 /* tcp */
#define IPPROTO_UDP 17 /* user datagram protocol */

#define INADDR_ANY (u_int32_t)0x00000000
#define INADDR_BROADCAST (u_int32_t)0xffffffff /* must be masked */

#ifndef _UINT8_T_DECLARED
typedef __uint8_t uint8_t;
#define _UINT8_T_DECLARED
#endif

#ifndef _UINT16_T_DECLARED
typedef __uint16_t uint16_t;
#define _UINT16_T_DECLARED
#endif

#ifndef _UINT32_T_DECLARED
typedef __uint32_t uint32_t;

How do you know when a politician is lying? His mouth is moving.


Report •

#2
July 5, 2009 at 07:19:36
Sounds like a homework question.

LIR


Report •

#3
July 5, 2009 at 16:43:31
I think you're right & I missed it once again.

How do you know when a politician is lying? His mouth is moving.


Report •

Related Solutions


Ask Question