Xenomai API
2.6.5
|
Functions | |
struct rtdm_dev_context * | rtdm_context_get (int fd) |
Retrieve and lock a device context. More... | |
int | rtdm_select_bind (int fd, rtdm_selector_t *selector, enum rtdm_selecttype type, unsigned fd_index) |
Bind a selector to specified event types of a given file descriptor. More... | |
void | rtdm_context_lock (struct rtdm_dev_context *context) |
Increment context reference counter. More... | |
void | rtdm_context_unlock (struct rtdm_dev_context *context) |
Decrement context reference counter. More... | |
void | rtdm_context_put (struct rtdm_dev_context *context) |
Release a device context obtained via rtdm_context_get() More... | |
int | rtdm_open (const char *path, int oflag,...) |
Open a device. More... | |
int | rtdm_socket (int protocol_family, int socket_type, int protocol) |
Create a socket. More... | |
int | rtdm_close (int fd) |
Close a device or socket. More... | |
int | rtdm_ioctl (int fd, int request,...) |
Issue an IOCTL. More... | |
ssize_t | rtdm_read (int fd, void *buf, size_t nbyte) |
Read from device. More... | |
ssize_t | rtdm_write (int fd, const void *buf, size_t nbyte) |
Write to device. More... | |
ssize_t | rtdm_recvmsg (int fd, struct user_msghdr *msg, int flags) |
Receive message from socket. More... | |
ssize_t | rtdm_recvfrom (int fd, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) |
Receive message from socket. More... | |
ssize_t | rtdm_recv (int fd, void *buf, size_t len, int flags) |
Receive message from socket. More... | |
ssize_t | rtdm_sendmsg (int fd, const struct user_msghdr *msg, int flags) |
Transmit message to socket. More... | |
ssize_t | rtdm_sendto (int fd, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) |
Transmit message to socket. More... | |
ssize_t | rtdm_send (int fd, const void *buf, size_t len, int flags) |
Transmit message to socket. More... | |
int | rtdm_bind (int fd, const struct sockaddr *my_addr, socklen_t addrlen) |
Bind to local address. More... | |
int | rtdm_connect (int fd, const struct sockaddr *serv_addr, socklen_t addrlen) |
Connect to remote address. More... | |
int | rtdm_listen (int fd, int backlog) |
Listen for incomming connection requests. More... | |
int | rtdm_accept (int fd, struct sockaddr *addr, socklen_t *addrlen) |
Accept a connection requests. More... | |
int | rtdm_shutdown (int fd, int how) |
Shut down parts of a connection. More... | |
int | rtdm_getsockopt (int fd, int level, int optname, void *optval, socklen_t *optlen) |
Get socket option. More... | |
int | rtdm_setsockopt (int fd, int level, int optname, const void *optval, socklen_t optlen) |
Set socket option. More... | |
int | rtdm_getsockname (int fd, struct sockaddr *name, socklen_t *namelen) |
Get local socket address. More... | |
int | rtdm_getpeername (int fd, struct sockaddr *name, socklen_t *namelen) |
Get socket destination address. More... | |
int rtdm_accept | ( | int | fd, |
struct sockaddr * | addr, | ||
socklen_t * | addrlen | ||
) |
Accept a connection requests.
Refer to rt_dev_accept() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_bind | ( | int | fd, |
const struct sockaddr * | my_addr, | ||
socklen_t | addrlen | ||
) |
Bind to local address.
Refer to rt_dev_bind() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_close | ( | int | fd | ) |
Close a device or socket.
Refer to rt_dev_close() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_connect | ( | int | fd, |
const struct sockaddr * | serv_addr, | ||
socklen_t | addrlen | ||
) |
Connect to remote address.
Refer to rt_dev_connect() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
struct rtdm_dev_context* rtdm_context_get | ( | int | fd | ) |
Retrieve and lock a device context.
[in] | fd | File descriptor |
Environments:
This service can be called from:
Rescheduling: never.
References rtdm_dev_context::close_lock_count, and rtdm_dev_context::fd.
Referenced by rtdm_select_bind().
void rtdm_context_lock | ( | struct rtdm_dev_context * | context | ) |
Increment context reference counter.
[in] | context | Device context |
Environments:
This service can be called from:
Rescheduling: never.
void rtdm_context_put | ( | struct rtdm_dev_context * | context | ) |
Release a device context obtained via rtdm_context_get()
[in] | context | Device context |
Environments:
This service can be called from:
Rescheduling: never.
void rtdm_context_unlock | ( | struct rtdm_dev_context * | context | ) |
Decrement context reference counter.
[in] | context | Device context |
Environments:
This service can be called from:
Rescheduling: never.
Referenced by rtdm_select_bind().
int rtdm_getpeername | ( | int | fd, |
struct sockaddr * | name, | ||
socklen_t * | namelen | ||
) |
Get socket destination address.
Refer to rt_dev_getpeername() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_getsockname | ( | int | fd, |
struct sockaddr * | name, | ||
socklen_t * | namelen | ||
) |
Get local socket address.
Refer to rt_dev_getsockname() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_getsockopt | ( | int | fd, |
int | level, | ||
int | optname, | ||
void * | optval, | ||
socklen_t * | optlen | ||
) |
Get socket option.
Refer to rt_dev_getsockopt() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_ioctl | ( | int | fd, |
int | request, | ||
... | |||
) |
Issue an IOCTL.
Refer to rt_dev_ioctl() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_listen | ( | int | fd, |
int | backlog | ||
) |
Listen for incomming connection requests.
Refer to rt_dev_listen() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_open | ( | const char * | path, |
int | oflag, | ||
... | |||
) |
Open a device.
Refer to rt_dev_open() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_read | ( | int | fd, |
void * | buf, | ||
size_t | nbyte | ||
) |
Read from device.
Refer to rt_dev_read() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_recv | ( | int | fd, |
void * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
Receive message from socket.
Refer to rt_dev_recv() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_recvfrom | ( | int | fd, |
void * | buf, | ||
size_t | len, | ||
int | flags, | ||
struct sockaddr * | from, | ||
socklen_t * | fromlen | ||
) |
Receive message from socket.
Refer to rt_dev_recvfrom() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_recvmsg | ( | int | fd, |
struct user_msghdr * | msg, | ||
int | flags | ||
) |
Receive message from socket.
Refer to rt_dev_recvmsg() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_select_bind | ( | int | fd, |
rtdm_selector_t * | selector, | ||
enum rtdm_selecttype | type, | ||
unsigned | fd_index | ||
) |
Bind a selector to specified event types of a given file descriptor.
This function is invoked by higher RTOS layers implementing select-like services. It shall not be called directly by RTDM drivers.
[in] | fd | File descriptor to bind to |
[in,out] | selector | Selector object that shall be bound to the given event |
[in] | type | Event type the caller is interested in |
[in] | fd_index | Index in the file descriptor set of the caller |
Environments:
This service can be called from:
Rescheduling: never.
References rtdm_dev_context::ops, rtdm_context_get(), rtdm_context_unlock(), and rtdm_operations::select_bind.
ssize_t rtdm_send | ( | int | fd, |
const void * | buf, | ||
size_t | len, | ||
int | flags | ||
) |
Transmit message to socket.
Refer to rt_dev_send() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_sendmsg | ( | int | fd, |
const struct user_msghdr * | msg, | ||
int | flags | ||
) |
Transmit message to socket.
Refer to rt_dev_sendmsg() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_sendto | ( | int | fd, |
const void * | buf, | ||
size_t | len, | ||
int | flags, | ||
const struct sockaddr * | to, | ||
socklen_t | tolen | ||
) |
Transmit message to socket.
Refer to rt_dev_sendto() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_setsockopt | ( | int | fd, |
int | level, | ||
int | optname, | ||
const void * | optval, | ||
socklen_t | optlen | ||
) |
Set socket option.
Refer to rt_dev_setsockopt() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_shutdown | ( | int | fd, |
int | how | ||
) |
Shut down parts of a connection.
Refer to rt_dev_shutdown() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
int rtdm_socket | ( | int | protocol_family, |
int | socket_type, | ||
int | protocol | ||
) |
Create a socket.
Refer to rt_dev_socket() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.
ssize_t rtdm_write | ( | int | fd, |
const void * | buf, | ||
size_t | nbyte | ||
) |
Write to device.
Refer to rt_dev_write() for parameters and return values
Environments:
Depends on driver implementation, see Device Profiles.
Rescheduling: possible.