Revision 9634d903 slirp/socket.c
b/slirp/socket.c | ||
---|---|---|
13 | 13 |
#include <sys/filio.h> |
14 | 14 |
#endif |
15 | 15 |
|
16 |
void |
|
16 |
static void sofcantrcvmore(struct socket *so); |
|
17 |
static void sofcantsendmore(struct socket *so); |
|
18 |
|
|
19 |
#if 0 |
|
20 |
static void |
|
17 | 21 |
so_init() |
18 | 22 |
{ |
19 | 23 |
/* Nothing yet */ |
20 | 24 |
} |
21 |
|
|
25 |
#endif |
|
22 | 26 |
|
23 | 27 |
struct socket * |
24 | 28 |
solookup(head, laddr, lport, faddr, fport) |
... | ... | |
421 | 425 |
int len, n; |
422 | 426 |
|
423 | 427 |
if (!(m = m_get())) return; |
424 |
m->m_data += if_maxlinkhdr;
|
|
428 |
m->m_data += IF_MAXLINKHDR;
|
|
425 | 429 |
|
426 | 430 |
/* |
427 | 431 |
* XXX Shouldn't FIONREAD packets destined for port 53, |
... | ... | |
604 | 608 |
return so; |
605 | 609 |
} |
606 | 610 |
|
611 |
#if 0 |
|
607 | 612 |
/* |
608 | 613 |
* Data is available in so_rcv |
609 | 614 |
* Just write() the data to the socket |
610 | 615 |
* XXX not yet... |
611 | 616 |
*/ |
612 |
void |
|
617 |
static void
|
|
613 | 618 |
sorwakeup(so) |
614 | 619 |
struct socket *so; |
615 | 620 |
{ |
... | ... | |
622 | 627 |
* We have room for a read() if we want to |
623 | 628 |
* For now, don't read, it'll be done in the main loop |
624 | 629 |
*/ |
625 |
void |
|
630 |
static void
|
|
626 | 631 |
sowwakeup(so) |
627 | 632 |
struct socket *so; |
628 | 633 |
{ |
629 | 634 |
/* Nothing, yet */ |
630 | 635 |
} |
636 |
#endif |
|
631 | 637 |
|
632 | 638 |
/* |
633 | 639 |
* Various session state calls |
... | ... | |
652 | 658 |
so->so_state |= SS_ISFCONNECTED; /* Clobber other states */ |
653 | 659 |
} |
654 | 660 |
|
655 |
void |
|
656 |
sofcantrcvmore(so) |
|
657 |
struct socket *so; |
|
661 |
static void |
|
662 |
sofcantrcvmore(struct socket *so) |
|
658 | 663 |
{ |
659 | 664 |
if ((so->so_state & SS_NOFDREF) == 0) { |
660 | 665 |
shutdown(so->s,0); |
... | ... | |
669 | 674 |
so->so_state |= SS_FCANTRCVMORE; |
670 | 675 |
} |
671 | 676 |
|
672 |
void |
|
673 |
sofcantsendmore(so) |
|
674 |
struct socket *so; |
|
677 |
static void |
|
678 |
sofcantsendmore(struct socket *so) |
|
675 | 679 |
{ |
676 | 680 |
if ((so->so_state & SS_NOFDREF) == 0) { |
677 | 681 |
shutdown(so->s,1); /* send FIN to fhost */ |
Also available in: Unified diff