Content-type: text/html
Manpage of TCBsendtoWFD
TCBsendtoWFD
Section: Timely Computing Base (1)
Updated: 30 September 2002
Index
Return to Main Contents
NAME
TCBsendtoWFD - sends a message from a TCB socket using the distributed timing failure detection service of the TCB.
SYNOPSIS
#include
"tcb/tcb.h"
int TCBsendtoWFD(void* buff, int nbytes, unsigned int flags, struct sockaddr *to, int addrlen, unsigned char dest_mask, unsigned dest_port, TCBsocketDesc* desc, TCBtimestamp send_evt, TCBtimeinterval spec,TCBtimeinterval deadline, Func_Id func);
DESCRIPTION
TCBsendtoWFD
is used to transmit a message to another socket. If the message is not delivered within
spec
(microseconds resolution) from
send_evt
, then a timing failure occurs and func will be executed in a timely manner
and within a
deadline
constraint.
The address of the target is given by
to
with
addrlen
specifying its size. The length of the message is given by
nbytes.
If the message is too long to pass atomically through the
underlying protocol, the error
EMSGSIZE
is returned, and the message is not transmitted.
No indication of failure to deliver is implicit in a
TCBsendtoWFD.
Locally detected errors are indicated by a return value of -1.
When the message does not fit into the send buffer of the socket,
TCBsendtoWFD
normally blocks, unless the socket has been placed in non-blocking I/O
mode. In non-blocking mode it would return
EAGAIN
in this case.
The
select(2)
call may be used to determine when it is possible to send more data.
The parameter
desc
is the descriptor of the TCB socket.
func
identifies the user function (in kernel space) that will be executed if a timing failure occurs.
typedef struct {
char module[50];
char funcname[50];
char wcetname[50];
}
Func_Id;
module
is the kernel module in which function is defined.
funcname
is the name of the function.
wcetname
is the name of the function which specifies the execution time for the function.
The
flags
parameter is a flagword and can contain the following flags:
- MSG_DONTROUTE
-
Don't use a gateway to send out the packet, only send to hosts on
directly connected networks. This is usually used only
by diagnostic or routing programs. This is only defined for protocol
families that route; packet sockets don't.
- MSG_DONTWAIT
-
Enables non-blocking operation; if the operation would block,
EAGAIN
is returned (this can also be enabled using the
O_NONBLOCK
with the
F_SETFL
fcntl(2)).
- MSG_NOSIGNAL
-
Requests not to send
SIGPIPE
on errors on stream oriented sockets when the other end breaks the
connection. The
EPIPE
error is still returned.
RETURN VALUES
The calls return the number of characters sent, or
ERRORS
if errno==0
TCB_ACESS_ERROR
if an error occurred on the access to the TCB.
if errno!=0
These are some standard errors generated by the socket layer. Additional errors
may be generated and returned from the underlying protocol modules; see their
respective manual pages.
- EBADF
-
An invalid descriptor was specified.
- ENOTSOCK
-
The argument
s
is not a socket.
- EFAULT
-
An invalid user space address was specified for a parameter.
- EMSGSIZE
-
The socket requires that message be sent atomically, and the size
of the message to be sent made this impossible.
- EAGAIN or EWOULDBLOCK
-
The socket is marked non-blocking and the requested operation
would block.
- ENOBUFS
-
The output queue for a network interface was full.
This generally indicates that the interface has stopped sending,
but may be caused by transient congestion.
(This cannot occur in Linux, packets are just silently dropped
when a device queue overflows.)
- EINTR
-
A signal occurred.
- ENOMEM
-
No memory available.
- EINVAL
-
Invalid argument passed.
- EPIPE
-
The local end has been shut down on a connection oriented socket.
In this case the process
will also receive a
SIGPIPE
unless
MSG_NOSIGNAL
is set.
SEE ALSO
sendto (2), TCBsocket, TCBbind (1), TCBwinfoport (1), TCBrecvfrom (1), TCBsocketClose (1)
Index
- NAME
-
- SYNOPSIS
-
- DESCRIPTION
-
- RETURN VALUES
-
- ERRORS
-
- SEE ALSO
-
This document was created by
man2html,
using the manual pages.
Time: 23:05:27 GMT, August 06, 2003