mirror of
https://git.savannah.nongnu.org/git/lwip.git
synced 2025-08-04 21:44:38 +08:00
PPP, CORE, using u8_t on ioctl command instead of int
We don't need an int here, all commands are between 0 and 255.
This commit is contained in:
parent
bfe0c3a8e0
commit
dc2e700057
@ -350,7 +350,7 @@ pppapi_do_ppp_ioctl(struct pppapi_msg_msg *msg)
|
|||||||
* tcpip_thread context.
|
* tcpip_thread context.
|
||||||
*/
|
*/
|
||||||
err_t
|
err_t
|
||||||
pppapi_ioctl(ppp_pcb *pcb, int cmd, void *arg)
|
pppapi_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg)
|
||||||
{
|
{
|
||||||
struct pppapi_msg msg;
|
struct pppapi_msg msg;
|
||||||
msg.function = pppapi_do_ppp_ioctl;
|
msg.function = pppapi_do_ppp_ioctl;
|
||||||
|
@ -93,7 +93,7 @@ struct pppapi_msg_msg {
|
|||||||
u16_t holdoff;
|
u16_t holdoff;
|
||||||
} open;
|
} open;
|
||||||
struct {
|
struct {
|
||||||
int cmd;
|
u8_t cmd;
|
||||||
void *arg;
|
void *arg;
|
||||||
} ioctl;
|
} ioctl;
|
||||||
#if LWIP_NETIF_STATUS_CALLBACK
|
#if LWIP_NETIF_STATUS_CALLBACK
|
||||||
@ -137,7 +137,7 @@ err_t pppapi_open(ppp_pcb *pcb, u16_t holdoff);
|
|||||||
err_t pppapi_close(ppp_pcb *pcb);
|
err_t pppapi_close(ppp_pcb *pcb);
|
||||||
void pppapi_sighup(ppp_pcb *pcb);
|
void pppapi_sighup(ppp_pcb *pcb);
|
||||||
err_t pppapi_free(ppp_pcb *pcb);
|
err_t pppapi_free(ppp_pcb *pcb);
|
||||||
err_t pppapi_ioctl(ppp_pcb *pcb, int cmd, void *arg);
|
err_t pppapi_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg);
|
||||||
#if LWIP_NETIF_STATUS_CALLBACK
|
#if LWIP_NETIF_STATUS_CALLBACK
|
||||||
void pppapi_set_netif_statuscallback(ppp_pcb *pcb, netif_status_callback_fn status_callback);
|
void pppapi_set_netif_statuscallback(ppp_pcb *pcb, netif_status_callback_fn status_callback);
|
||||||
#endif /* LWIP_NETIF_STATUS_CALLBACK */
|
#endif /* LWIP_NETIF_STATUS_CALLBACK */
|
||||||
|
@ -497,7 +497,7 @@ err_t ppp_free(ppp_pcb *pcb);
|
|||||||
* Get and set parameters for the given connection.
|
* Get and set parameters for the given connection.
|
||||||
* Return 0 on success, an error code on failure.
|
* Return 0 on success, an error code on failure.
|
||||||
*/
|
*/
|
||||||
err_t ppp_ioctl(ppp_pcb *pcb, int cmd, void *arg);
|
err_t ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg);
|
||||||
|
|
||||||
/* Get the PPP netif interface */
|
/* Get the PPP netif interface */
|
||||||
#define ppp_netif(ppp) (ppp->netif)
|
#define ppp_netif(ppp) (ppp->netif)
|
||||||
|
@ -341,7 +341,7 @@ err_t ppp_free(ppp_pcb *pcb) {
|
|||||||
/* Get and set parameters for the given connection.
|
/* Get and set parameters for the given connection.
|
||||||
* Return 0 on success, an error code on failure. */
|
* Return 0 on success, an error code on failure. */
|
||||||
err_t
|
err_t
|
||||||
ppp_ioctl(ppp_pcb *pcb, int cmd, void *arg)
|
ppp_ioctl(ppp_pcb *pcb, u8_t cmd, void *arg)
|
||||||
{
|
{
|
||||||
if (pcb == NULL) {
|
if (pcb == NULL) {
|
||||||
return ERR_VAL;
|
return ERR_VAL;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user