Реферат: Интранет сети

union REGS regs;

struct SREGS sregs;

struct {

unsigned int len;

unsigned char buffer_type;

unsigned char connection_number;

} request_buffer;

struct {

unsigned int len;

unsigned char network_number [4];

unsigned char physical_node [6];

unsigned int server_socket;

} reply_buffer;

regs.h.ah = 0xe3;

request_buffer.len = 2;

request_buffer.buffer_type = 0x13;

request_buffer.connection_number = connection_number;

reply_buffer.len = 12;

regs.x.si = FP_OFF( (void far *) &request_buffer);

sregs.ds = FP_SEG( (void far *) &request_buffer);

regs.x.di = FP_OFF( (void far *) &reply_buffer);

sregs.es = FP_SEG( (void far *) &reply_buffer);

int86x(0x21, &regs, &regs, &sregs);

memcpy(network_number, reply_buffer.network_number, 4);

memcpy(physical_node, reply_buffer.physical_node, 6);

regs.h.ah = 0;

return regs.x.ax;

}

unsigned int get_1st_connection_num (char *who)

К-во Просмотров: 2097
Бесплатно скачать Реферат: Интранет сети