The FreeRADIUS server  $Id: 15bac2a4c627c01d1aa2047687b3418955ac7f00 $
Functions
iovec.c File Reference

Functions for a basic binary heaps. More...

#include <freeradius-devel/util/iovec.h>
#include <freeradius-devel/util/strerror.h>
#include <freeradius-devel/util/syserror.h>
+ Include dependency graph for iovec.c:

Go to the source code of this file.

Functions

fr_slen_t fr_concatv (fr_dbuff_t *out, struct iovec vector[], int iovcnt)
 Concatenate an iovec into a dbuff. More...
 
ssize_t fr_writev (int fd, struct iovec vector[], int iovcnt, fr_time_delta_t timeout)
 Write out a vector to a file descriptor. More...
 

Detailed Description

Functions for a basic binary heaps.

Definition in file iovec.c.

Function Documentation

◆ fr_concatv()

fr_slen_t fr_concatv ( fr_dbuff_t out,
struct iovec  vector[],
int  iovcnt 
)

Concatenate an iovec into a dbuff.

Parameters
[out]outdbuff to write to.
[in]vectorto concatenate.
[in]iovcntlength of vector array.
Returns
  • >= 0 on success.
  • <0 on failure.

Definition at line 38 of file iovec.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ fr_writev()

ssize_t fr_writev ( int  fd,
struct iovec  vector[],
int  iovcnt,
fr_time_delta_t  timeout 
)

Write out a vector to a file descriptor.

Wraps writev, calling it as necessary. If timeout is not NULL, timeout is applied to each call that returns EAGAIN or EWOULDBLOCK

Note
Should only be used on nonblocking file descriptors.
Socket should likely be closed on timeout.
iovec may be modified in such a way that it's not reusable.
Leaves errno set to the last error that occurred.
Parameters
fdto write to.
vectorto write.
iovcntnumber of elements in iovec.
timeouthow long to wait for fd to become writable before timing out.
Returns
  • Number of bytes written.
  • -1 on failure.

Definition at line 68 of file iovec.c.

+ Here is the call graph for this function:
+ Here is the caller graph for this function: