diff options
author | Gregory Nutt <gnutt@nuttx.org> | 2014-06-29 12:22:50 -0600 |
---|---|---|
committer | Gregory Nutt <gnutt@nuttx.org> | 2014-06-29 12:22:50 -0600 |
commit | 5c4d51bb64d37019f2991fe2cc7615b5f64faf80 (patch) | |
tree | 6d5c9cbbb485dd5017d6fc73e756b5166999f032 /apps | |
parent | 1deaf2a9634576bf0e0f35a24911c3f22215fbd2 (diff) | |
download | nuttx-5c4d51bb64d37019f2991fe2cc7615b5f64faf80.tar.gz nuttx-5c4d51bb64d37019f2991fe2cc7615b5f64faf80.tar.bz2 nuttx-5c4d51bb64d37019f2991fe2cc7615b5f64faf80.zip |
NET: Renaming of IP address types
Diffstat (limited to 'apps')
-rw-r--r-- | apps/include/netutils/smtp.h | 23 | ||||
-rw-r--r-- | apps/netutils/smtp/smtp.c | 8 | ||||
-rw-r--r-- | apps/nshlib/nsh_netcmds.c | 2 |
3 files changed, 19 insertions, 14 deletions
diff --git a/apps/include/netutils/smtp.h b/apps/include/netutils/smtp.h index 05b4d543e..cb344b9df 100644 --- a/apps/include/netutils/smtp.h +++ b/apps/include/netutils/smtp.h @@ -52,23 +52,28 @@ ****************************************************************************/ /**************************************************************************** - * Public Function Prototypes + * Public Data ****************************************************************************/ #ifdef __cplusplus #define EXTERN extern "C" -extern "C" { +extern "C" +{ #else #define EXTERN extern #endif -EXTERN void *smtp_open(void); -EXTERN void smtp_configure(void *handle, const char *localhostname, - const uip_ipaddr_t *paddr); -EXTERN int smtp_send(void *handle, const char *to, const char *cc, - const char *from, const char *subject, - const char *msg, int msglen); -EXTERN void smtp_close(void *handle); +/**************************************************************************** + * Public Function Prototypes + ****************************************************************************/ + +void *smtp_open(void); +void smtp_configure(FAR void *handle, FAR const char *localhostname, + FAR const net_ipaddr_t *paddr); +int smtp_send(FAR void *handle, FAR const char *to, FAR const char *cc, + FAR const char *from, FAR const char *subject, + FAR const char *msg, int msglen); +void smtp_close(FAR void *handle); #undef EXTERN #ifdef __cplusplus diff --git a/apps/netutils/smtp/smtp.c b/apps/netutils/smtp/smtp.c index d83e260c5..4009beb0d 100644 --- a/apps/netutils/smtp/smtp.c +++ b/apps/netutils/smtp/smtp.c @@ -87,7 +87,7 @@ struct smtp_state uint8_t state; bool connected; sem_t sem; - uip_ipaddr_t smtpserver; + net_ipaddr_t smtpserver; const char *localhostname; const char *to; const char *cc; @@ -283,10 +283,10 @@ static inline int smtp_send_message(int sockfd, struct smtp_state *psmtp) * configured. */ -void smtp_configure(void *handle, const char *lhostname, - const uip_ipaddr_t *paddr) +void smtp_configure(FAR void *handle, FAR const char *lhostname, + FAR const net_ipaddr_t *paddr) { - struct smtp_state *psmtp = (struct smtp_state *)handle; + FAR struct smtp_state *psmtp = (FAR struct smtp_state *)handle; psmtp->localhostname = lhostname; uip_ipaddr_copy(psmtp->smtpserver, paddr); } diff --git a/apps/nshlib/nsh_netcmds.c b/apps/nshlib/nsh_netcmds.c index d0213bb54..4ea58d974 100644 --- a/apps/nshlib/nsh_netcmds.c +++ b/apps/nshlib/nsh_netcmds.c @@ -845,7 +845,7 @@ int cmd_ping(FAR struct nsh_vtbl_s *vtbl, int argc, char **argv) { FAR const char *fmt = g_fmtarginvalid; const char *staddr; - uip_ipaddr_t ipaddr; + net_ipaddr_t ipaddr; uint32_t start; uint32_t next; uint32_t dsec = 10; |