Commit cf55a513 authored by Robert Schmidt's avatar Robert Schmidt

ASYNC_IF: peer addresses as const in interface

parent c19bdb77
...@@ -97,7 +97,7 @@ link_manager_t *create_link_manager( ...@@ -97,7 +97,7 @@ link_manager_t *create_link_manager(
message_queue_t *receive_queue, message_queue_t *receive_queue,
socket_link_t *link, socket_link_t *link,
uint16_t type, uint16_t type,
char *peer_addr, const char *peer_addr,
int port ) int port )
{ {
link_manager_t *ret = NULL; link_manager_t *ret = NULL;
......
...@@ -58,7 +58,7 @@ link_manager_t *create_link_manager( ...@@ -58,7 +58,7 @@ link_manager_t *create_link_manager(
message_queue_t *receive_queue, message_queue_t *receive_queue,
socket_link_t *link, socket_link_t *link,
uint16_t type, uint16_t type,
char *peer_addr, const char *peer_addr,
int port); int port);
void destroy_link_manager(link_manager_t *); void destroy_link_manager(link_manager_t *);
......
...@@ -115,7 +115,7 @@ error: ...@@ -115,7 +115,7 @@ error:
return NULL; return NULL;
} }
socket_link_t *new_link_client(char *server, int port) socket_link_t *new_link_client(const char *server, int port)
{ {
socket_link_t *ret = NULL; socket_link_t *ret = NULL;
struct sockaddr_in addr; struct sockaddr_in addr;
...@@ -208,7 +208,7 @@ error: ...@@ -208,7 +208,7 @@ error:
} }
socket_link_t *new_link_udp_client(char *server, int port){ socket_link_t *new_link_udp_client(const char *server, int port){
socket_link_t *ret = NULL; socket_link_t *ret = NULL;
ret = calloc(1, sizeof(socket_link_t)); ret = calloc(1, sizeof(socket_link_t));
...@@ -307,7 +307,7 @@ error: ...@@ -307,7 +307,7 @@ error:
return NULL; return NULL;
} }
socket_link_t *new_link_sctp_client(char *server, int port) socket_link_t *new_link_sctp_client(const char *server, int port)
{ {
socket_link_t *ret = NULL; socket_link_t *ret = NULL;
......
...@@ -47,11 +47,11 @@ typedef struct { ...@@ -47,11 +47,11 @@ typedef struct {
} socket_link_t; } socket_link_t;
socket_link_t *new_link_server(int port); socket_link_t *new_link_server(int port);
socket_link_t *new_link_client(char *server, int port); socket_link_t *new_link_client(const char *server, int port);
socket_link_t *new_link_udp_server(int port); socket_link_t *new_link_udp_server(int port);
socket_link_t *new_link_udp_client(char *server, int port); socket_link_t *new_link_udp_client(const char *server, int port);
socket_link_t *new_link_sctp_server(int port); socket_link_t *new_link_sctp_server(int port);
socket_link_t *new_link_sctp_client(char *server, int port); socket_link_t *new_link_sctp_client(const char *server, int port);
int link_send_packet(socket_link_t *link, void *data, int size, uint16_t proto_type, char *peer_addr, int port); int link_send_packet(socket_link_t *link, void *data, int size, uint16_t proto_type, char *peer_addr, int port);
int link_receive_packet(socket_link_t *link, void **data, int *size, uint16_t proto_type, char *peer_addr, int port); int link_receive_packet(socket_link_t *link, void **data, int *size, uint16_t proto_type, char *peer_addr, int port);
int close_link(socket_link_t *link); int close_link(socket_link_t *link);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment