summaryrefslogtreecommitdiff
path: root/src/ipcpd/shim-udp/main.c
diff options
context:
space:
mode:
authordimitri staessens <[email protected]>2016-04-21 15:04:10 +0200
committerdimitri staessens <[email protected]>2016-04-21 15:04:10 +0200
commite57fb225562afeec7e151c64f8f4e6312b447c7c (patch)
treef88692cd216fc27f04033ce6e32372db3ae7b16d /src/ipcpd/shim-udp/main.c
parent18c5da3a77fd736c45730d562e35c4957269ebe3 (diff)
downloadouroboros-e57fb225562afeec7e151c64f8f4e6312b447c7c.tar.gz
ouroboros-e57fb225562afeec7e151c64f8f4e6312b447c7c.zip
ipcpd: fixes comments on 18c5da3
Diffstat (limited to 'src/ipcpd/shim-udp/main.c')
-rw-r--r--src/ipcpd/shim-udp/main.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/ipcpd/shim-udp/main.c b/src/ipcpd/shim-udp/main.c
index 130ac17e..14b08ba8 100644
--- a/src/ipcpd/shim-udp/main.c
+++ b/src/ipcpd/shim-udp/main.c
@@ -48,7 +48,7 @@
#define THIS_TYPE IPCP_SHIM_UDP
#define LISTEN_PORT htons(0x0D1F)
#define SHIM_UDP_BUF_SIZE 256
-#define SHIM_UDP_MAX_SDU_SIZE 9000
+#define SHIM_UDP_MAX_SDU_SIZE 8980
#define shim_data(type) ((struct ipcp_udp_data *) type->data)
@@ -127,7 +127,7 @@ struct ipcp_udp_data * ipcp_udp_data_create(char * ap_name,
return NULL;
}
- udp_data = malloc (sizeof *udp_data);
+ udp_data = malloc(sizeof *udp_data);
if (udp_data == NULL) {
LOG_DBGF("Failed to allocate.");
return NULL;
@@ -147,7 +147,7 @@ struct ipcp_udp_data * ipcp_udp_data_create(char * ap_name,
return udp_data;
}
-void * ipcp_udp_listener()
+static void * ipcp_udp_listener()
{
char buf[SHIM_UDP_BUF_SIZE];
int n = 0;
@@ -251,7 +251,7 @@ void * ipcp_udp_listener()
}
}
-static void * ipcp_udp_sdu_reader (void * o)
+static void * ipcp_udp_sdu_reader()
{
int n;
int fd;
@@ -423,7 +423,7 @@ int ipcp_udp_flow_alloc(uint32_t port_id,
if (qos != NULL)
LOG_DBGF("QoS requested. UDP/IP can't do that.");
- flow = malloc (sizeof *flow);
+ flow = malloc(sizeof *flow);
if (flow == NULL)
return -1;
@@ -494,7 +494,7 @@ int ipcp_udp_flow_alloc(uint32_t port_id,
ret_msg = send_recv_irm_msg(&msg);
if (ret_msg == NULL) {
- close (flow->fd);
+ close(flow->fd);
ipcp_data_del_flow(_ipcp->data, flow->flow.port_id);
return -1;
}
@@ -562,7 +562,7 @@ struct ipcp * ipcp_udp_create(char * ap_name, char * i_id)
return NULL;
}
- ops = malloc (sizeof *ops);
+ ops = malloc(sizeof *ops);
if (ops == NULL) {
free(data);
free(i);