version 1.1.1.8, 2018/04/24 17:41:09
|
version 1.1.1.9, 2018/04/24 18:31:19
|
Line 41
|
Line 41
|
#include <slirp.h> |
#include <slirp.h> |
#include "ip_icmp.h" |
#include "ip_icmp.h" |
|
|
static u_int8_t udp_tos(struct socket *so); |
static uint8_t udp_tos(struct socket *so); |
|
|
void |
void |
udp_init(Slirp *slirp) |
udp_init(Slirp *slirp) |
Line 88 udp_input(register struct mbuf *m, int i
|
Line 88 udp_input(register struct mbuf *m, int i
|
* Make mbuf data length reflect UDP length. |
* Make mbuf data length reflect UDP length. |
* If not enough data to reflect UDP length, drop. |
* If not enough data to reflect UDP length, drop. |
*/ |
*/ |
len = ntohs((u_int16_t)uh->uh_ulen); |
len = ntohs((uint16_t)uh->uh_ulen); |
|
|
if (ip->ip_len != len) { |
if (ip->ip_len != len) { |
if (len > ip->ip_len) { |
if (len > ip->ip_len) { |
Line 321 static const struct tos_t udptos[] = {
|
Line 321 static const struct tos_t udptos[] = {
|
{0, 0, 0, 0} |
{0, 0, 0, 0} |
}; |
}; |
|
|
static u_int8_t |
static uint8_t |
udp_tos(struct socket *so) |
udp_tos(struct socket *so) |
{ |
{ |
int i = 0; |
int i = 0; |
Line 339 udp_tos(struct socket *so)
|
Line 339 udp_tos(struct socket *so)
|
} |
} |
|
|
struct socket * |
struct socket * |
udp_listen(Slirp *slirp, u_int32_t haddr, u_int hport, u_int32_t laddr, |
udp_listen(Slirp *slirp, uint32_t haddr, u_int hport, uint32_t laddr, |
u_int lport, int flags) |
u_int lport, int flags) |
{ |
{ |
struct sockaddr_in addr; |
struct sockaddr_in addr; |