Watt-32 tcp/ip  2.2 dev-rel.10
Functions
transmit.c File Reference

Go to the source code of this file.

Functions

static int raw_transmit (Socket *socket, const void *buf, unsigned len)
 
static int udp_transmit (Socket *socket, const void *buf, unsigned len)
 
static int tcp_transmit (Socket *socket, const void *buf, unsigned len, int flags)
 
static int setup_udp_raw (Socket *socket, const struct sockaddr *to, int tolen)
 
static int transmit (const char *func, int s, const void *buf, unsigned len, int flags, const struct sockaddr *to, int tolen, BOOL have_remote_addr)
 
int W32_CALL sendto (int s, const void *buf, int len, int flags, const struct sockaddr *to, int tolen)
 
int W32_CALL send (int s, const void *buf, int len, int flags)
 
int W32_CALL write_s (int s, const char *buf, int nbyte)
 
int W32_CALL writev_s (int s, const struct iovec *vector, size_t count)
 
int W32_CALL sendmsg (int s, const struct msghdr *msg, int flags)
 
static __inline void msg_eor_close (Socket *socket)
 
static __inline BOOL check_non_block_tx (Socket *socket, unsigned *len)
 
static int ip4_transmit (Socket *socket, const void *tx, unsigned len)
 Raw IPv4 transmitter. More...
 
static int ip6_transmit (Socket *socket, const void *tx, unsigned len)
 Raw IPv6 transmitter. More...
 

Detailed Description

BSD send(), sendto(), write().

Definition in file transmit.c.

Function Documentation

static int ip4_transmit ( Socket socket,
const void tx,
unsigned  len 
)
static

Raw IPv4 transmitter.

Note
'tx' is always non-NULL and 'len' is always > 0. Except for SOCK_DGRAM probe packets (tx=NULL and len==0).
Todo:
Handle sending fragments with IP optons

Definition at line 724 of file transmit.c.

References _arp_resolve(), _eth_formatpacket(), _eth_send(), _get_ip4_id(), and gethostid().

static int ip6_transmit ( Socket socket,
const void tx,
unsigned  len 
)
static

Raw IPv6 transmitter.

Note
'tx' is always non-NULL and 'len' is always > 0. Except for SOCK_DGRAM probe packets (tx=NULL and len==0).
Todo:
support fragmentation

Definition at line 881 of file transmit.c.

References _default_ttl, _eth_formatpacket(), _eth_send(), _gethostid6(), _inet6_ntoa(), and icmp6_neigh_solic().

static int tcp_transmit ( Socket socket,
const void buf,
unsigned  len,
int  flags 
)
static
Todo:
Allow non-blocking sockets to send in SYNSENT state

Definition at line 474 of file transmit.c.

References _inet6_ntoa(), tcp_Socket::datatimer, tcp_Socket::max_tx_data, sock_enqueue(), sock_write(), tcp_Socket::state, tcp_Retransmitter(), and tcp_tick().