Displaying 1 result from an estimated 1 matches for "socket_handle".
2007 Feb 12
1
playing with SO_BROADCAST on centos
...0000:  4500 0030 091a 0000 8011 ad8f c0a8 01b9  E..0............
        0x0010:  c0a8 010a 0024 0024 001c b581 4321 3039  .....$.$....C!09
        0x0020:  c0a8 01b9 ffff ff00 0001 3cd0 5449 0001  ..........<.TI..
My program is:
int main(int argc, char *argv[])
{
int error;
int total = 0;
int socket_handle;
enum 
	{
	NMP_PORT = 36,
	NMP_MAGIC = 0x4321,
	NMP_LIST = 12345,
	NMP_SET_IP,
	NMP_SET_MASK
	};
typedef union 
	{
	unsigned char b[4];
	uint32_t v;
	} IPADDR;
typedef struct 
	{
	unsigned char b[6];
	} MACADDR;
typedef struct 
	{
	unsigned short magic;
	unsigned short code;
	IPADDR ip;
	IPADDR...