|
OSAPI
0.29
Open System API
|
The networking module. More...

Functions | |
| t_status | com_module_supported (void) |
| Declares if the module is supported on the current implementation. More... | |
| t_status | com_connection_accept (char *uri, t_connection *connection) |
| Accepts connections for any valid URI. More... | |
| t_status | com_connection_establish (char *uri, t_connection *connection) |
| Creates a connection to any valid URI. More... | |
| t_status | com_connection_close (t_connection *connection) |
| Closes an established connection. More... | |
| t_status | com_endpoint_create (t_protocol prot, t_endpoint *ep) |
| Create a TCP type based on IP and logical Port. More... | |
| t_status | com_endpoint_destroy (t_endpoint *ep) |
| Destroy the resources associated with an endpoint. More... | |
| t_status | com_ip_getStringSize (t_protocol prot, t_size *size) |
| Obtain the required size to store a C-String for the given IP protocol. More... | |
| t_status | com_ip_getHost (t_ip *ip, t_size size, char *string) |
| Get the source IP. More... | |
| t_status | com_ip_getMask (t_ip *ip, t_size size, char *string) |
| Get the mask associated with the IP. More... | |
| t_status | com_ip_getTarget (t_ip *ip, t_size size, char *string) |
| Obtain the C-String for the target protocol: Broadcast, Point to Point,. More... | |
| t_status | com_ip_isV4 (t_ip *ip, bool *result) |
| Verify if the IP is Version 4. More... | |
| t_status | com_ip_isV6 (t_ip *ip, bool *result) |
| Verify if the IP is Version 6. More... | |
| t_status | com_ip_isBroadcast (t_ip *ip, bool *result) |
| Verify if the IP is of type broadcast. More... | |
| t_status | com_ip_isP2P (t_ip *ip, bool *result) |
| Verify if the IP is of type Point to Point. More... | |
| t_status | com_ip_create (char *ipString, t_ip *ip) |
| Create a TCP type based on IP and logical Port. More... | |
| t_status | com_ip_destroy (t_ip *ip) |
| Destroy the resources associated with a IP type. More... | |
| t_status | com_semaphore_supported (void) |
| Are semaphores supported in this platform ? More... | |
| t_status | com_semaphore_create (key_t key, int sem_value, int sem_options, int *semid) |
| Create an IPC semaphore. More... | |
| t_status | com_semaphore_destroy (int semid) |
| Destroys the semaphore identified by "semid". More... | |
| t_status | com_semaphore_open (key_t key, int *semid) |
| Returns the semaphore ID for the provided semaphore key. More... | |
| t_status | com_semaphore_lock (int semid, bool wait) |
| Locks a given semaphore. More... | |
| t_status | com_semaphore_unlock (int semid, bool wait) |
| Unlocks a given semaphore. More... | |
| t_status | com_semaphore_getValue (int semid, int *value) |
| Obtains the semaphore value that corresponds to the given ID. More... | |
| t_status | com_tcp_create (t_ip ip, t_lport port, t_tcp *tcp) |
| Create a TCP type based on IP and logical Port. More... | |
| t_status | com_tcp_destroy (t_tcp *tcp) |
| Destroy the resources associated with a TCP type. More... | |
The networking module.
The TCP section of the communication module.
The IP section of the communication module.
The endpoint section of the communication module.
The communication module IPC.
| t_status com_connection_accept | ( | char * | uri, |
| t_connection * | connection | ||
| ) |
Accepts connections for any valid URI.
| [in] | uri | - The connection identification string |
| [out] | connection | - Connection information |
| t_status com_connection_close | ( | t_connection * | connection | ) |
Closes an established connection.
| [in] | connection | - Connection address |
| t_status com_connection_establish | ( | char * | uri, |
| t_connection * | connection | ||
| ) |
Creates a connection to any valid URI.
| [in] | uri | - The connection identification string |
| [out] | connection | - Connection information |
| t_status com_endpoint_create | ( | t_protocol | prot, |
| t_endpoint * | ep | ||
| ) |
Create a TCP type based on IP and logical Port.
| [in] | prot | - The endpoint communication protocol |
| [out] | ep | - Communication endpoint |
| t_status com_endpoint_destroy | ( | t_endpoint * | ep | ) |
Destroy the resources associated with an endpoint.
Create a TCP type based on IP and logical Port.
| [in] | ipString | - A source or target IP in string format |
| [out] | ip | - The decoded (from string) IP |
Destroy the resources associated with a IP type.
| [in] | ip | - IP type address |
Get the source IP.
| [in] | ip | - The IP to verify |
| [in] | size | - The size of the C-String |
| [out] | string | - The source IP |
Get the mask associated with the IP.
| [in] | ip | - The IP to verify |
| [in] | size | - The size of the C-String |
| [out] | string | - The IP mask |
| t_status com_ip_getStringSize | ( | t_protocol | prot, |
| t_size * | size | ||
| ) |
Obtain the required size to store a C-String for the given IP protocol.
| [in] | prot | - IP protocol (IPv4/6) |
| [out] | size | - Required size |
Obtain the C-String for the target protocol: Broadcast, Point to Point,.
| [in] | ip | - The IP to verify |
| [in] | size | - The size of the C-String |
| [out] | string | - The IP string |
Verify if the IP is of type broadcast.
| [in] | ip | - The IP to verify |
| [out] | result | - True/False |
Verify if the IP is of type Point to Point.
| [in] | ip | - The IP to verify |
| [out] | result | - True/False |
Verify if the IP is Version 4.
| [in] | ip | - The IP to verify |
| [out] | result | - True/False |
Verify if the IP is Version 6.
| [in] | ip | - The IP to verify |
| [out] | result | - True/False |
| t_status com_module_supported | ( | void | ) |
Declares if the module is supported on the current implementation.
| t_status com_semaphore_create | ( | key_t | key, |
| int | sem_value, | ||
| int | sem_options, | ||
| int * | semid | ||
| ) |
Create an IPC semaphore.
| [in] | key | - Semaphore key |
| [in] | sem_value | - Semaphore value |
| [in] | sem_options | - Semaphore options |
| [out] | semid | - Semaphore ID |
| t_status com_semaphore_destroy | ( | int | semid | ) |
Destroys the semaphore identified by "semid".
| [in] | semid | - Semaphore ID |
| t_status com_semaphore_getValue | ( | int | semid, |
| int * | value | ||
| ) |
Obtains the semaphore value that corresponds to the given ID.
| [in] | semid | - Semaphore ID |
| [out] | value | - Semaphore value |
| t_status com_semaphore_lock | ( | int | semid, |
| bool | wait | ||
| ) |
Locks a given semaphore.
| [in] | semid | - Semaphore ID |
| [in] | wait | - Block until semaphore lock is acquired |
| t_status com_semaphore_open | ( | key_t | key, |
| int * | semid | ||
| ) |
Returns the semaphore ID for the provided semaphore key.
| [in] | key | - Semaphore key |
| [out] | semid | - Semaphore ID |
| t_status com_semaphore_supported | ( | void | ) |
Are semaphores supported in this platform ?
| t_status com_semaphore_unlock | ( | int | semid, |
| bool | wait | ||
| ) |
Unlocks a given semaphore.
| [in] | semid | - Semaphore ID |
| [in] | wait | - Block until semaphore lock is released |
Create a TCP type based on IP and logical Port.
| [in] | ip | - A source or target IP |
| [in] | port | - A source or target Port |
| [out] | tcp | - A combination of IP and Port |