NET: Renaming of IP address types

This commit is contained in:
Gregory Nutt 2014-06-29 12:22:50 -06:00
parent 80f8944eeb
commit 165e5df670
3 changed files with 19 additions and 14 deletions

View File

@ -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

View File

@ -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);
}

View File

@ -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;