Go to the source code of this file.
Functions | |
int | p_socket_open (uint32_t localip, uint32_t broadcast_add, int port) |
Create a particle socket. | |
int | p_socket_close (int sock) |
Close a particle socket. | |
int | p_socket_set_lastacks (int counter) |
Set the number of packets, which should be stored to find doublets of acking-packets. | |
int | p_socket_set_lastdups (int counter) |
Set the number of packets, which should be stored to find doublets. | |
int | p_socket_set_ipdest (int sock, const struct in_addr *address) |
Set the destination-add for a socket. | |
int | p_socket_set_ipdest_str (int sock, const char *address) |
Set the destination-add for a socket [string]. | |
int | p_socket_set_ipdest_all (int fd) |
Set the destination-add for a socket [string]. | |
int | p_socket_set_ipsrc_all (int sock) |
Set a Socket to receive all-mode. | |
int | p_socket_set_ipsrc (int sock, const struct in_addr *address) |
Set the source-add for a socket. | |
int | p_socket_set_ipsrc_str (int sock, const char *address) |
Set the source-add for a socket [string]. | |
int | p_socket_set_id (int sock, const uint8_t *add) |
Sets a particle sockets own net ID. | |
int | p_socket_set_id_str (int sock, const char *addstr) |
Sets a particle sockets own net ID. | |
int | p_socket_set_loc (int sock, const uint8_t *loc) |
Sets a particle sockets location-ID. | |
int | p_socket_set_loc_str (int sock, const char *locstr) |
Sets a particle sockets location-ID. | |
int | p_socket_set_option (int fd, int option, int mode) |
Sets a socket-option. | |
int | p_socket_set_retry (int sock, uint8_t retries, uint32_t timeout) |
Sets the parameters for acknowledged sending. | |
void | p_describe_socket (int sock) |
Prints out all information about a socket. | |
int | p_socket_get_lastacks (void) |
Get the number of packets, which should be stored to find doublets of acking packets. | |
uint8_t * | p_socket_get_id (int fd) |
Get the net ID of a socket. | |
uint8_t * | p_socket_get_loc (int fd) |
Get the location-ID of a socket. | |
uint8_t * | p_socket_get_ipdest (int fd, int device_number) |
Get an IP-address, the socket sends to. | |
int | p_socket_get_num_interfaces (int fd) |
Get the number of interfaces the socket sends to. | |
int | p_socket_set_num_interfaces (int fd, int counter) |
Sets the number of interfaces, a socket will send to. | |
uint8_t * | p_socket_get_ipsrc (int fd) |
Get the IP-address the socket receives from. | |
int | p_socket_get_retry (int fd) |
Get the number of retrys, the socket currently makes when sending acked. | |
uint32_t | p_socket_get_timeout (int fd) |
Get the timeout [ms], the socket currently waits for acknowledges. | |
uint16_t | p_socket_get_port (int fd) |
Get the port-number of a socket. | |
int | p_socket_get_option (int fd, int option) |
Tests, if a socket-option is set to 0 or 1. | |
int | p_socket_get_blocking (int fd) |
Is a socket currently blocking? | |
int | p_socket_get_broadcast (int fd) |
Is a socket currently sending to broadcast? | |
uint8_t | p_socket_get_last_seq (int fd) |
Get the last sequence-ID of a socket. | |
p_packet * | p_socket_recv (int recv_sock, int send_sock) |
Receive data. | |
p_packet * | p_socket_recv_filtered (int recv_sock, int send_sock, int recv_filter) |
Receive data filtered. | |
int | p_socket_recv_raw (int sock, char *data, size_t maxlen) |
Receive raw data. | |
int | p_socket_send (int send_sock, struct p_packet *send_data) |
Send data. Send CL-packet send_data on socket send_sock. | |
int | p_socket_send_addressed (int send_sock, struct p_packet *send_data, uint8_t *add) |
Send data to a particle specified by its ID. | |
int | p_socket_send_addressed_str (int send_sock, struct p_packet *send_data, const char *add_str) |
Send data to a particle specified by its ID. | |
int | p_socket_send_acked (int send_sock, int recv_sock, struct p_packet *send_data, const uint8_t *add) |
Send data to a particle specified by its ID and wait for ACK control message. | |
int | p_socket_send_acked_str (int send_sock, int recv_sock, struct p_packet *send_data, const char *addstr) |
Send data to a particle specified by its ID and wait for ACK control message. | |
int | p_socket_send_buffer (int fd_out, int fd_in, const char *buf, uint32_t len, const uint8_t *sendto, const uint8_t *acl_type) |
Sending a data puffer to a particle. | |
int | p_socket_send_buffer_str (int fd_out, int fd_in, const char *buf, uint32_t len, const char *sendto, const char *acl_type) |
Sending a data puffer to a particle [ID and ACL as string]. | |
int | p_socket_send_file (int fd_out, int fd_in, const char *filename, const uint8_t *sendto, const uint8_t *acl_type) |
Sending data from a file to a particle. | |
int | p_socket_send_raw (int sock, const char *data, size_t len) |
Send raw data. | |
int | p_socket_get_send_status (int sendticket) |
Get the status for a send-ticket. | |
int | p_socket_delete_send_context (int sendticket) |
Deletes the context of a send-ticket. | |
int | p_socket_set_broadcast () |
int | p_socket_set_blocking () |
int | p_socket_set_autoack () |
int | p_socket_set_recv_option () |
int | p_socket_set_frag_option () |
Definition in file socket.h.