mirror of
https://github.com/izzy2lost/xemu.git
synced 2026-07-06 00:20:22 -07:00
Merge remote-tracking branch 'remotes/jasowang/tags/net-pull-request' into staging
# gpg: Signature made Thu 12 Nov 2015 08:01:55 GMT using RSA key ID 398D6211 # gpg: Good signature from "Jason Wang (Jason Wang on RedHat) <jasowang@redhat.com>" # gpg: WARNING: This key is not certified with sufficiently trusted signatures! # gpg: It is not certain that the signature belongs to the owner. # Primary key fingerprint: 215D 46F4 8246 689E C77F 3562 EF04 965B 398D 6211 * remotes/jasowang/tags/net-pull-request: net: netmap: use error_setg() helpers in place of error_report() net: netmap: Fix compilation issue e1000: Introducing backward compatibility command line parameter e1000: Implementing various counters e1000: Fixing the packet address filtering procedure e1000: Fixing the received/transmitted octets' counters e1000: Fixing the received/transmitted packets' counters e1000: Trivial implementation of various MAC registers e1000: Introduced an array to control the access to the MAC registers e1000: Add support for migrating the entire MAC registers' array e1000: Cosmetic and alignment fixes slirp: Fix type casts and format strings in debug code Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
This commit is contained in:
+368
-108
File diff suppressed because it is too large
Load Diff
+7
-1
@@ -158,7 +158,8 @@
|
||||
#define E1000_PHY_CTRL 0x00F10 /* PHY Control Register in CSR */
|
||||
#define FEXTNVM_SW_CONFIG 0x0001
|
||||
#define E1000_PBA 0x01000 /* Packet Buffer Allocation - RW */
|
||||
#define E1000_PBS 0x01008 /* Packet Buffer Size */
|
||||
#define E1000_PBM 0x10000 /* Packet Buffer Memory - RW */
|
||||
#define E1000_PBS 0x01008 /* Packet Buffer Size - RW */
|
||||
#define E1000_EEMNGCTL 0x01010 /* MNG EEprom Control */
|
||||
#define E1000_FLASH_UPDATES 1000
|
||||
#define E1000_EEARBC 0x01024 /* EEPROM Auto Read Bus Control */
|
||||
@@ -191,6 +192,11 @@
|
||||
#define E1000_RAID 0x02C08 /* Receive Ack Interrupt Delay - RW */
|
||||
#define E1000_TXDMAC 0x03000 /* TX DMA Control - RW */
|
||||
#define E1000_KABGTXD 0x03004 /* AFE Band Gap Transmit Ref Data */
|
||||
#define E1000_RDFH 0x02410 /* Receive Data FIFO Head Register - RW */
|
||||
#define E1000_RDFT 0x02418 /* Receive Data FIFO Tail Register - RW */
|
||||
#define E1000_RDFHS 0x02420 /* Receive Data FIFO Head Saved Register - RW */
|
||||
#define E1000_RDFTS 0x02428 /* Receive Data FIFO Tail Saved Register - RW */
|
||||
#define E1000_RDFPC 0x02430 /* Receive Data FIFO Packet Count - RW */
|
||||
#define E1000_TDFH 0x03410 /* TX Data FIFO Head - RW */
|
||||
#define E1000_TDFT 0x03418 /* TX Data FIFO Tail - RW */
|
||||
#define E1000_TDFHS 0x03420 /* TX Data FIFO Head Saved - RW */
|
||||
|
||||
+5
-1
@@ -6,7 +6,11 @@
|
||||
.driver = "virtio-blk-device",\
|
||||
.property = "scsi",\
|
||||
.value = "true",\
|
||||
},
|
||||
},{\
|
||||
.driver = "e1000",\
|
||||
.property = "extra_mac_registers",\
|
||||
.value = "off",\
|
||||
},
|
||||
|
||||
#define HW_COMPAT_2_3 \
|
||||
{\
|
||||
|
||||
+12
-12
@@ -90,7 +90,7 @@ pkt_copy(const void *_src, void *_dst, int l)
|
||||
* Open a netmap device. We assume there is only one queue
|
||||
* (which is the case for the VALE bridge).
|
||||
*/
|
||||
static int netmap_open(NetmapPriv *me)
|
||||
static void netmap_open(NetmapPriv *me, Error **errp)
|
||||
{
|
||||
int fd;
|
||||
int err;
|
||||
@@ -99,9 +99,8 @@ static int netmap_open(NetmapPriv *me)
|
||||
|
||||
me->fd = fd = open(me->fdname, O_RDWR);
|
||||
if (fd < 0) {
|
||||
error_report("Unable to open netmap device '%s' (%s)",
|
||||
me->fdname, strerror(errno));
|
||||
return -1;
|
||||
error_setg_file_open(errp, errno, me->fdname);
|
||||
return;
|
||||
}
|
||||
memset(&req, 0, sizeof(req));
|
||||
pstrcpy(req.nr_name, sizeof(req.nr_name), me->ifname);
|
||||
@@ -109,15 +108,14 @@ static int netmap_open(NetmapPriv *me)
|
||||
req.nr_version = NETMAP_API;
|
||||
err = ioctl(fd, NIOCREGIF, &req);
|
||||
if (err) {
|
||||
error_report("Unable to register %s: %s", me->ifname, strerror(errno));
|
||||
error_setg_errno(errp, errno, "Unable to register %s", me->ifname);
|
||||
goto error;
|
||||
}
|
||||
l = me->memsize = req.nr_memsize;
|
||||
|
||||
me->mem = mmap(0, l, PROT_WRITE | PROT_READ, MAP_SHARED, fd, 0);
|
||||
if (me->mem == MAP_FAILED) {
|
||||
error_report("Unable to mmap netmap shared memory: %s",
|
||||
strerror(errno));
|
||||
error_setg_errno(errp, errno, "Unable to mmap netmap shared memory");
|
||||
me->mem = NULL;
|
||||
goto error;
|
||||
}
|
||||
@@ -125,11 +123,11 @@ static int netmap_open(NetmapPriv *me)
|
||||
me->nifp = NETMAP_IF(me->mem, req.nr_offset);
|
||||
me->tx = NETMAP_TXRING(me->nifp, 0);
|
||||
me->rx = NETMAP_RXRING(me->nifp, 0);
|
||||
return 0;
|
||||
|
||||
return;
|
||||
|
||||
error:
|
||||
close(me->fd);
|
||||
return -1;
|
||||
}
|
||||
|
||||
static void netmap_send(void *opaque);
|
||||
@@ -438,9 +436,9 @@ static NetClientInfo net_netmap_info = {
|
||||
int net_init_netmap(const NetClientOptions *opts,
|
||||
const char *name, NetClientState *peer, Error **errp)
|
||||
{
|
||||
/* FIXME error_setg(errp, ...) on failure */
|
||||
const NetdevNetmapOptions *netmap_opts = opts->netmap;
|
||||
const NetdevNetmapOptions *netmap_opts = opts->u.netmap;
|
||||
NetClientState *nc;
|
||||
Error *err = NULL;
|
||||
NetmapPriv me;
|
||||
NetmapState *s;
|
||||
|
||||
@@ -448,7 +446,9 @@ int net_init_netmap(const NetClientOptions *opts,
|
||||
netmap_opts->has_devname ? netmap_opts->devname : "/dev/netmap");
|
||||
/* Set default name for the port if not supplied. */
|
||||
pstrcpy(me.ifname, sizeof(me.ifname), netmap_opts->ifname);
|
||||
if (netmap_open(&me)) {
|
||||
netmap_open(&me, &err);
|
||||
if (err) {
|
||||
error_propagate(errp, err);
|
||||
return -1;
|
||||
}
|
||||
/* Create the object. */
|
||||
|
||||
+9
-3
@@ -23,6 +23,12 @@
|
||||
*/
|
||||
#include <slirp.h>
|
||||
|
||||
#if defined(_WIN32)
|
||||
/* Windows ntohl() returns an u_long value.
|
||||
* Add a type cast to match the format strings. */
|
||||
# define ntohl(n) ((uint32_t)ntohl(n))
|
||||
#endif
|
||||
|
||||
/* XXX: only DHCP is supported */
|
||||
|
||||
#define LEASE_TIME (24 * 3600)
|
||||
@@ -155,7 +161,7 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
||||
dhcp_decode(bp, &dhcp_msg_type, &preq_addr);
|
||||
DPRINTF("bootp packet op=%d msgtype=%d", bp->bp_op, dhcp_msg_type);
|
||||
if (preq_addr.s_addr != htonl(0L))
|
||||
DPRINTF(" req_addr=%08x\n", ntohl(preq_addr.s_addr));
|
||||
DPRINTF(" req_addr=%08" PRIx32 "\n", ntohl(preq_addr.s_addr));
|
||||
else
|
||||
DPRINTF("\n");
|
||||
|
||||
@@ -234,7 +240,7 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
||||
q += 4;
|
||||
|
||||
if (bc) {
|
||||
DPRINTF("%s addr=%08x\n",
|
||||
DPRINTF("%s addr=%08" PRIx32 "\n",
|
||||
(dhcp_msg_type == DHCPDISCOVER) ? "offered" : "ack'ed",
|
||||
ntohl(daddr.sin_addr.s_addr));
|
||||
|
||||
@@ -302,7 +308,7 @@ static void bootp_reply(Slirp *slirp, const struct bootp_t *bp)
|
||||
} else {
|
||||
static const char nak_msg[] = "requested address not available";
|
||||
|
||||
DPRINTF("nak'ed addr=%08x\n", ntohl(preq_addr.s_addr));
|
||||
DPRINTF("nak'ed addr=%08" PRIx32 "\n", ntohl(preq_addr.s_addr));
|
||||
|
||||
*q++ = RFC2132_MSG_TYPE;
|
||||
*q++ = 1;
|
||||
|
||||
+2
-2
@@ -53,8 +53,8 @@ if_output(struct socket *so, struct mbuf *ifm)
|
||||
int on_fastq = 1;
|
||||
|
||||
DEBUG_CALL("if_output");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("ifm = %lx", (long)ifm);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("ifm = %p", ifm);
|
||||
|
||||
/*
|
||||
* First remove the mbuf from m_usedlist,
|
||||
|
||||
+2
-2
@@ -125,7 +125,7 @@ icmp_input(struct mbuf *m, int hlen)
|
||||
Slirp *slirp = m->slirp;
|
||||
|
||||
DEBUG_CALL("icmp_input");
|
||||
DEBUG_ARG("m = %lx", (long )m);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
DEBUG_ARG("m_len = %d", m->m_len);
|
||||
|
||||
/*
|
||||
@@ -252,7 +252,7 @@ icmp_error(struct mbuf *msrc, u_char type, u_char code, int minsize,
|
||||
register struct mbuf *m;
|
||||
|
||||
DEBUG_CALL("icmp_error");
|
||||
DEBUG_ARG("msrc = %lx", (long )msrc);
|
||||
DEBUG_ARG("msrc = %p", msrc);
|
||||
DEBUG_ARG("msrc_len = %d", msrc->m_len);
|
||||
|
||||
if(type!=ICMP_UNREACH && type!=ICMP_TIMXCEED) goto end_error;
|
||||
|
||||
+5
-5
@@ -80,7 +80,7 @@ ip_input(struct mbuf *m)
|
||||
int hlen;
|
||||
|
||||
DEBUG_CALL("ip_input");
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
DEBUG_ARG("m_len = %d", m->m_len);
|
||||
|
||||
if (m->m_len < sizeof (struct ip)) {
|
||||
@@ -232,9 +232,9 @@ ip_reass(Slirp *slirp, struct ip *ip, struct ipq *fp)
|
||||
int i, next;
|
||||
|
||||
DEBUG_CALL("ip_reass");
|
||||
DEBUG_ARG("ip = %lx", (long)ip);
|
||||
DEBUG_ARG("fp = %lx", (long)fp);
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("ip = %p", ip);
|
||||
DEBUG_ARG("fp = %p", fp);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
|
||||
/*
|
||||
* Presence of header sizes in mbufs
|
||||
@@ -400,7 +400,7 @@ static void
|
||||
ip_enq(register struct ipasfrag *p, register struct ipasfrag *prev)
|
||||
{
|
||||
DEBUG_CALL("ip_enq");
|
||||
DEBUG_ARG("prev = %lx", (long)prev);
|
||||
DEBUG_ARG("prev = %p", prev);
|
||||
p->ipf_prev = prev;
|
||||
p->ipf_next = prev->ipf_next;
|
||||
((struct ipasfrag *)(prev->ipf_next))->ipf_prev = p;
|
||||
|
||||
+2
-2
@@ -60,8 +60,8 @@ ip_output(struct socket *so, struct mbuf *m0)
|
||||
int len, off, error = 0;
|
||||
|
||||
DEBUG_CALL("ip_output");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("m0 = %lx", (long)m0);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("m0 = %p", m0);
|
||||
|
||||
ip = mtod(m, struct ip *);
|
||||
/*
|
||||
|
||||
+3
-3
@@ -94,7 +94,7 @@ m_get(Slirp *slirp)
|
||||
m->arp_requested = false;
|
||||
m->expiration_date = (uint64_t)-1;
|
||||
end_error:
|
||||
DEBUG_ARG("m = %lx", (long )m);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
return m;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ m_free(struct mbuf *m)
|
||||
{
|
||||
|
||||
DEBUG_CALL("m_free");
|
||||
DEBUG_ARG("m = %lx", (long )m);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
|
||||
if(m) {
|
||||
/* Remove from m_usedlist */
|
||||
@@ -221,7 +221,7 @@ dtom(Slirp *slirp, void *dat)
|
||||
struct mbuf *m;
|
||||
|
||||
DEBUG_CALL("dtom");
|
||||
DEBUG_ARG("dat = %lx", (long )dat);
|
||||
DEBUG_ARG("dat = %p", dat);
|
||||
|
||||
/* bug corrected for M_EXT buffers */
|
||||
for (m = slirp->m_usedlist.m_next; m != &slirp->m_usedlist;
|
||||
|
||||
+3
-3
@@ -123,9 +123,9 @@ fork_exec(struct socket *so, const char *ex, int do_pty)
|
||||
pid_t pid;
|
||||
|
||||
DEBUG_CALL("fork_exec");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("ex = %lx", (long)ex);
|
||||
DEBUG_ARG("do_pty = %lx", (long)do_pty);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("ex = %p", ex);
|
||||
DEBUG_ARG("do_pty = %x", do_pty);
|
||||
|
||||
if (do_pty == 2) {
|
||||
return 0;
|
||||
|
||||
+2
-2
@@ -72,8 +72,8 @@ sbappend(struct socket *so, struct mbuf *m)
|
||||
int ret = 0;
|
||||
|
||||
DEBUG_CALL("sbappend");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
DEBUG_ARG("m->m_len = %d", m->m_len);
|
||||
|
||||
/* Shouldn't happen, but... e.g. foreign host closes connection */
|
||||
|
||||
+9
-9
@@ -91,7 +91,7 @@ size_t sopreprbuf(struct socket *so, struct iovec *iov, int *np)
|
||||
int mss = so->so_tcpcb->t_maxseg;
|
||||
|
||||
DEBUG_CALL("sopreprbuf");
|
||||
DEBUG_ARG("so = %lx", (long )so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
if (len <= 0)
|
||||
return 0;
|
||||
@@ -155,7 +155,7 @@ soread(struct socket *so)
|
||||
struct iovec iov[2];
|
||||
|
||||
DEBUG_CALL("soread");
|
||||
DEBUG_ARG("so = %lx", (long )so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
/*
|
||||
* No need to check if there's enough room to read.
|
||||
@@ -215,7 +215,7 @@ int soreadbuf(struct socket *so, const char *buf, int size)
|
||||
struct iovec iov[2];
|
||||
|
||||
DEBUG_CALL("soreadbuf");
|
||||
DEBUG_ARG("so = %lx", (long )so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
/*
|
||||
* No need to check if there's enough room to read.
|
||||
@@ -263,7 +263,7 @@ sorecvoob(struct socket *so)
|
||||
struct tcpcb *tp = sototcpcb(so);
|
||||
|
||||
DEBUG_CALL("sorecvoob");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
/*
|
||||
* We take a guess at how much urgent data has arrived.
|
||||
@@ -293,7 +293,7 @@ sosendoob(struct socket *so)
|
||||
int n, len;
|
||||
|
||||
DEBUG_CALL("sosendoob");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("sb->sb_cc = %d", sb->sb_cc);
|
||||
|
||||
if (so->so_urgc > 2048)
|
||||
@@ -351,7 +351,7 @@ sowrite(struct socket *so)
|
||||
struct iovec iov[2];
|
||||
|
||||
DEBUG_CALL("sowrite");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
if (so->so_urgc) {
|
||||
sosendoob(so);
|
||||
@@ -441,7 +441,7 @@ sorecvfrom(struct socket *so)
|
||||
socklen_t addrlen = sizeof(struct sockaddr_in);
|
||||
|
||||
DEBUG_CALL("sorecvfrom");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
if (so->so_type == IPPROTO_ICMP) { /* This is a "ping" reply */
|
||||
char buff[256];
|
||||
@@ -543,8 +543,8 @@ sosendto(struct socket *so, struct mbuf *m)
|
||||
struct sockaddr_in addr;
|
||||
|
||||
DEBUG_CALL("sosendto");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
|
||||
addr.sin_family = AF_INET;
|
||||
if ((so->so_faddr.s_addr & slirp->vnetwork_mask.s_addr) ==
|
||||
|
||||
+7
-7
@@ -231,8 +231,8 @@ tcp_input(struct mbuf *m, int iphlen, struct socket *inso)
|
||||
Slirp *slirp;
|
||||
|
||||
DEBUG_CALL("tcp_input");
|
||||
DEBUG_ARGS((dfd, " m = %8lx iphlen = %2d inso = %lx\n",
|
||||
(long )m, iphlen, (long )inso ));
|
||||
DEBUG_ARGS((dfd, " m = %p iphlen = %2d inso = %p\n",
|
||||
m, iphlen, inso));
|
||||
|
||||
/*
|
||||
* If called with m == 0, then we're continuing the connect
|
||||
@@ -923,8 +923,8 @@ trimthenstep6:
|
||||
|
||||
if (SEQ_LEQ(ti->ti_ack, tp->snd_una)) {
|
||||
if (ti->ti_len == 0 && tiwin == tp->snd_wnd) {
|
||||
DEBUG_MISC((dfd, " dup ack m = %lx so = %lx\n",
|
||||
(long )m, (long )so));
|
||||
DEBUG_MISC((dfd, " dup ack m = %p so = %p\n",
|
||||
m, so));
|
||||
/*
|
||||
* If we have outstanding data (other than
|
||||
* a window probe), this is a completely
|
||||
@@ -1302,7 +1302,7 @@ tcp_dooptions(struct tcpcb *tp, u_char *cp, int cnt, struct tcpiphdr *ti)
|
||||
int opt, optlen;
|
||||
|
||||
DEBUG_CALL("tcp_dooptions");
|
||||
DEBUG_ARGS((dfd, " tp = %lx cnt=%i\n", (long)tp, cnt));
|
||||
DEBUG_ARGS((dfd, " tp = %p cnt=%i\n", tp, cnt));
|
||||
|
||||
for (; cnt > 0; cnt -= optlen, cp += optlen) {
|
||||
opt = cp[0];
|
||||
@@ -1383,7 +1383,7 @@ tcp_xmit_timer(register struct tcpcb *tp, int rtt)
|
||||
register short delta;
|
||||
|
||||
DEBUG_CALL("tcp_xmit_timer");
|
||||
DEBUG_ARG("tp = %lx", (long)tp);
|
||||
DEBUG_ARG("tp = %p", tp);
|
||||
DEBUG_ARG("rtt = %d", rtt);
|
||||
|
||||
if (tp->t_srtt != 0) {
|
||||
@@ -1471,7 +1471,7 @@ tcp_mss(struct tcpcb *tp, u_int offer)
|
||||
int mss;
|
||||
|
||||
DEBUG_CALL("tcp_mss");
|
||||
DEBUG_ARG("tp = %lx", (long)tp);
|
||||
DEBUG_ARG("tp = %p", tp);
|
||||
DEBUG_ARG("offer = %d", offer);
|
||||
|
||||
mss = min(IF_MTU, IF_MRU) - sizeof(struct tcpiphdr);
|
||||
|
||||
+1
-1
@@ -66,7 +66,7 @@ tcp_output(struct tcpcb *tp)
|
||||
int idle, sendalot;
|
||||
|
||||
DEBUG_CALL("tcp_output");
|
||||
DEBUG_ARG("tp = %lx", (long )tp);
|
||||
DEBUG_ARG("tp = %p", tp);
|
||||
|
||||
/*
|
||||
* Determine length of data that should be transmitted,
|
||||
|
||||
+8
-8
@@ -224,7 +224,7 @@ tcp_newtcpcb(struct socket *so)
|
||||
struct tcpcb *tcp_drop(struct tcpcb *tp, int err)
|
||||
{
|
||||
DEBUG_CALL("tcp_drop");
|
||||
DEBUG_ARG("tp = %lx", (long)tp);
|
||||
DEBUG_ARG("tp = %p", tp);
|
||||
DEBUG_ARG("errno = %d", errno);
|
||||
|
||||
if (TCPS_HAVERCVDSYN(tp->t_state)) {
|
||||
@@ -249,7 +249,7 @@ tcp_close(struct tcpcb *tp)
|
||||
register struct mbuf *m;
|
||||
|
||||
DEBUG_CALL("tcp_close");
|
||||
DEBUG_ARG("tp = %lx", (long )tp);
|
||||
DEBUG_ARG("tp = %p", tp);
|
||||
|
||||
/* free the reassembly queue, if any */
|
||||
t = tcpfrag_list_first(tp);
|
||||
@@ -290,7 +290,7 @@ tcp_sockclosed(struct tcpcb *tp)
|
||||
{
|
||||
|
||||
DEBUG_CALL("tcp_sockclosed");
|
||||
DEBUG_ARG("tp = %lx", (long)tp);
|
||||
DEBUG_ARG("tp = %p", tp);
|
||||
|
||||
switch (tp->t_state) {
|
||||
|
||||
@@ -330,7 +330,7 @@ int tcp_fconnect(struct socket *so)
|
||||
int ret=0;
|
||||
|
||||
DEBUG_CALL("tcp_fconnect");
|
||||
DEBUG_ARG("so = %lx", (long )so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
if( (ret = so->s = qemu_socket(AF_INET,SOCK_STREAM,0)) >= 0) {
|
||||
int opt, s=so->s;
|
||||
@@ -393,7 +393,7 @@ void tcp_connect(struct socket *inso)
|
||||
int s, opt;
|
||||
|
||||
DEBUG_CALL("tcp_connect");
|
||||
DEBUG_ARG("inso = %lx", (long)inso);
|
||||
DEBUG_ARG("inso = %p", inso);
|
||||
|
||||
/*
|
||||
* If it's an SS_ACCEPTONCE socket, no need to socreate()
|
||||
@@ -564,8 +564,8 @@ tcp_emu(struct socket *so, struct mbuf *m)
|
||||
char *bptr;
|
||||
|
||||
DEBUG_CALL("tcp_emu");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
|
||||
switch(so->so_emu) {
|
||||
int x, i;
|
||||
@@ -900,7 +900,7 @@ int tcp_ctl(struct socket *so)
|
||||
int do_pty;
|
||||
|
||||
DEBUG_CALL("tcp_ctl");
|
||||
DEBUG_ARG("so = %lx", (long )so);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
|
||||
if (so->so_faddr.s_addr != slirp->vhost_addr.s_addr) {
|
||||
/* Check if it's pty_exec */
|
||||
|
||||
+3
-3
@@ -72,7 +72,7 @@ udp_input(register struct mbuf *m, int iphlen)
|
||||
struct socket *so;
|
||||
|
||||
DEBUG_CALL("udp_input");
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
DEBUG_ARG("iphlen = %d", iphlen);
|
||||
|
||||
/*
|
||||
@@ -241,8 +241,8 @@ int udp_output2(struct socket *so, struct mbuf *m,
|
||||
int error = 0;
|
||||
|
||||
DEBUG_CALL("udp_output");
|
||||
DEBUG_ARG("so = %lx", (long)so);
|
||||
DEBUG_ARG("m = %lx", (long)m);
|
||||
DEBUG_ARG("so = %p", so);
|
||||
DEBUG_ARG("m = %p", m);
|
||||
DEBUG_ARG("saddr = %lx", (long)saddr->sin_addr.s_addr);
|
||||
DEBUG_ARG("daddr = %lx", (long)daddr->sin_addr.s_addr);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user