mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2025-03-12 22:14:25 +00:00
PPP, removed now useless struct ppp_addrs from ppp_pcb
Saved a few bytes of useless copy.
This commit is contained in:
parent
c966a538fb
commit
b3c7e948be
@ -289,6 +289,7 @@ typedef struct ppp_settings_s {
|
||||
|
||||
} ppp_settings;
|
||||
|
||||
#if PPP_SERVER
|
||||
struct ppp_addrs {
|
||||
#if PPP_IPV4_SUPPORT
|
||||
ip_addr_t our_ipaddr, his_ipaddr, netmask;
|
||||
@ -300,6 +301,7 @@ struct ppp_addrs {
|
||||
ip6_addr_t our6_ipaddr, his6_ipaddr;
|
||||
#endif /* PPP_IPV6_SUPPORT */
|
||||
};
|
||||
#endif /* PPP_SERVER */
|
||||
|
||||
/*
|
||||
* PPP interface control block.
|
||||
@ -352,8 +354,6 @@ struct ppp_pcb_s {
|
||||
|
||||
u32_t last_xmit; /* Time of last transmission. */
|
||||
|
||||
struct ppp_addrs addrs; /* PPP addresses */
|
||||
|
||||
/* auth data */
|
||||
#if PPP_SERVER
|
||||
char peer_authname[MAXNAMELEN + 1]; /* The name by which the peer authenticated itself to us. */
|
||||
@ -537,9 +537,6 @@ err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg);
|
||||
/* Get the PPP netif interface */
|
||||
#define ppp_netif(ppp) (ppp->netif)
|
||||
|
||||
/* Get the PPP addresses */
|
||||
#define ppp_addrs(ppp) (&(ppp)->addrs)
|
||||
|
||||
/* Set an lwIP-style status-callback for the selected PPP device */
|
||||
#define ppp_set_netif_statuscallback(ppp, status_cb) \
|
||||
netif_set_status_callback(ppp->netif, status_cb);
|
||||
|
@ -582,9 +582,6 @@ void ppp_clear(ppp_pcb *pcb) {
|
||||
#endif /* PPP_STATS_SUPPORT */
|
||||
|
||||
memset(&pcb->phase, 0, sizeof(ppp_pcb) - ( (char*)&((ppp_pcb*)0)->phase - (char*)0 ) );
|
||||
#if PPP_IPV4_SUPPORT
|
||||
ip4_addr_set_u32(&pcb->addrs.netmask, IPADDR_BROADCAST);
|
||||
#endif /* PPP_IPV4_SUPPORT */
|
||||
|
||||
/*
|
||||
* Initialize each protocol.
|
||||
|
Loading…
x
Reference in New Issue
Block a user