version 1.1 | | version 1.2 |
---|
| | |
#include <unistd.h> | | #include <unistd.h> |
#include <errno.h> | | #include <errno.h> |
| | |
| | #include "netstats.h" |
#include "ipx_ld.h" | | #include "ipx_ld.h" |
#include "ipx_hlpr.h" | | #include "ipx_hlpr.h" |
#include "ipx_lin.h" | | #include "ipx_lin.h" |
| | |
leave_priv_setting(); | | leave_priv_setting(); |
sk->fd = sock; | | sk->fd = sock; |
sk->socket = port; | | sk->socket = port; |
| | net_stats_init(30); // IPX header overhead = 30 bytes. |
return 0; | | return 0; |
} | | } |
| | |
| | |
memcpy(&ipxs.sipx_port, IPXHeader->Destination.Socket, 2); | | memcpy(&ipxs.sipx_port, IPXHeader->Destination.Socket, 2); |
ipxs.sipx_type = IPXHeader->PacketType; | | ipxs.sipx_type = IPXHeader->PacketType; |
/* ipxs.sipx_port=htons(0x452); */ | | /* ipxs.sipx_port=htons(0x452); */ |
| | net_stats_sent(dataLen); |
return sendto(mysock->fd, data, dataLen, 0, | | return sendto(mysock->fd, data, dataLen, 0, |
(struct sockaddr *) &ipxs, sizeof(ipxs)); | | (struct sockaddr *) &ipxs, sizeof(ipxs)); |
} | | } |
| | |
rd->dst_socket = s->socket; | | rd->dst_socket = s->socket; |
rd->pkt_type = ipxs.sipx_type; | | rd->pkt_type = ipxs.sipx_type; |
| | |
| | net_stats_recv(size); |
return size; | | return size; |
} | | } |