lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] Name space collisions from api_msg.c


From: Mason
Subject: [lwip-devel] Name space collisions from api_msg.c
Date: Mon, 19 Mar 2012 15:14:27 +0100
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:10.0.2) Gecko/20120216 Firefox/10.0.2 SeaMonkey/2.7.2

Hello,

api_msg.h exports several functions with very common names,
leading to name space collisions with user code or other
library code:

void do_newconn         ( struct api_msg_msg *msg);
void do_delconn         ( struct api_msg_msg *msg);
void do_bind            ( struct api_msg_msg *msg);
void do_connect         ( struct api_msg_msg *msg);
void do_disconnect      ( struct api_msg_msg *msg);
void do_listen          ( struct api_msg_msg *msg);
void do_send            ( struct api_msg_msg *msg);
void do_recv            ( struct api_msg_msg *msg);
void do_write           ( struct api_msg_msg *msg);
void do_getaddr         ( struct api_msg_msg *msg);
void do_close           ( struct api_msg_msg *msg);
void do_shutdown        ( struct api_msg_msg *msg);
void do_join_leave_group( struct api_msg_msg *msg);
void do_gethostbyname(void *arg);

By the way, why do these functions all have external linkage?
(instead of static linkage)

I see two options:

1) make all these functions static
2) prefix each function with "lwip_"

Which option is better? Did I miss other options (aside
from "do nothing" :-)

-- 
Regards.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]