mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2026-05-22 08:06:51 +08:00
PPP, CCP, added receive and transmit chosen protocols in ccp_flags_set() (renamed ccp_set())
We need to know which methods were chosen when CCP is up, this used to be done using ccp_test() which we are in the process of removing. Using non-existing method 0 instead of -1 in CCP for unset method, allowing type change from s16_t to u8_t for method.
This commit is contained in:
@@ -152,7 +152,7 @@ typedef struct ccp_options {
|
||||
#if DEFLATE_SUPPORT
|
||||
u_short deflate_size; /* lg(window size) for Deflate */
|
||||
#endif /* DEFLATE_SUPPORT */
|
||||
short method; /* code for chosen compression method */
|
||||
u8_t method; /* code for chosen compression method */
|
||||
} ccp_options;
|
||||
|
||||
extern const struct protent ccp_protent;
|
||||
|
||||
@@ -475,7 +475,7 @@ int netif_get_mtu(ppp_pcb *pcb);
|
||||
|
||||
#if CCP_SUPPORT
|
||||
int ccp_test(ppp_pcb *pcb, u_char *opt_ptr, int opt_len, int for_transmit);
|
||||
void ccp_flags_set(ppp_pcb *pcb, int isopen, int isup);
|
||||
void ccp_set(ppp_pcb *pcb, u8_t isopen, u8_t isup, u8_t receive_method, u8_t transmit_method);
|
||||
int ccp_fatal_error(ppp_pcb *pcb);
|
||||
#endif /* CCP_SUPPORT */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user