420 |
#endif |
#endif |
421 |
|
|
422 |
struct cu_header { |
struct cu_header { |
423 |
char dest[8]; |
uint16_t d_family; // destination family |
424 |
short family; |
uint16_t d_port; // destination port |
425 |
u_short port; |
uint32_t d_addr; // destination address |
426 |
u_long addr; |
uint16_t s_family; // source family |
427 |
|
uint16_t s_port; // source port |
428 |
|
uint32_t s_addr; // source address |
429 |
|
uint32_t seqn; // sequence number |
430 |
|
uint16_t message; // message |
431 |
|
uint16_t data_type; // data type |
432 |
|
uint16_t pkt_len; // packet length |
433 |
} *cu_head; |
} *cu_head; |
434 |
|
|
435 |
switch(so->so_emu) { |
switch(so->so_emu) { |
616 |
if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0) |
if (getsockname(so->s, (struct sockaddr *)&addr, &addrlen) < 0) |
617 |
return; |
return; |
618 |
cu_head = mtod(m, struct cu_header *); |
cu_head = mtod(m, struct cu_header *); |
619 |
cu_head->port = addr.sin_port; |
cu_head->s_port = addr.sin_port; |
620 |
cu_head->addr = (u_long) our_addr.s_addr; |
cu_head->s_addr = our_addr.s_addr; |
621 |
} |
} |
622 |
|
|
623 |
return; |
return; |