su 1.12.11devel
Loading...
Searching...
No Matches
Data Fields
su_iovec_s Struct Reference

I/O vector for scatter-gather I/O. More...

#include <su.h>

Data Fields

void * siv_base
 Pointer to buffer.
 
su_ioveclen_t siv_len
 Size of buffer.
 

Detailed Description

I/O vector for scatter-gather I/O.

This is the I/O vector element used with su_vsend() and su_vrecv(). It is defined like struct iovec with POSIX sockets:

struct iovec {
void *iov_base; // Pointer to data.
size_t iov_len; // Length of data.
};

When using WINSOCK sockets it is defined as WSABUF:

typedef struct __WSABUF {
u_long len;
char FAR* buf;
} WSABUF, *LPWSABUF;
Note
Ordering of the fields is reversed on Windows. Do not initialize this structure with static initializer, but assign both fields separately. Note that the type of the siv_len is su_ioveclen_t which is defined as u_long on Windows and size_t on POSIX.

For historical reasons, the structure is known as msg_iovec_t in msg module.

See also
su_ioveclen_t, SU_IOVECLEN_MAX, su_vsend(), su_vrecv(), msg_iovec_t, msg_iovec(), msg_recv_iovec(), struct iovec defined in <sys/uio.h>, writev(2), readv(2), sendmsg(), recvmsg(), WSABUF of WinSock2

Field Documentation

◆ siv_len

su_ioveclen_t siv_len

Size of buffer.



Sofia-SIP 1.12.11devel - Copyright (C) 2006 Nokia Corporation. All rights reserved. Licensed under the terms of the GNU Lesser General Public License.