Lines Matching full:ctx

19 static void lcp_up(struct ppp_context *ctx)  in lcp_up()  argument
27 proto->lower_up(ctx); in lcp_up()
32 static void do_network(struct ppp_context *ctx) in do_network() argument
34 ppp_change_phase(ctx, PPP_NETWORK); in do_network()
39 proto->open(ctx); in do_network()
56 ctx->network_protos_open++; in do_network()
57 proto->open(ctx); in do_network()
61 if (ctx->network_protos_open == 0) { in do_network()
65 proto->close(ctx, "No network protocols open"); in do_network()
70 static void do_auth(struct ppp_context *ctx) in do_auth() argument
74 ppp_change_phase(ctx, PPP_AUTH); in do_auth()
77 auth_proto = ctx->lcp.peer_options.auth_proto; in do_auth()
82 ppp_link_authenticated(ctx); in do_auth()
89 proto->open(ctx); in do_auth()
97 void ppp_link_established(struct ppp_context *ctx, struct ppp_fsm *fsm) in ppp_link_established() argument
99 NET_DBG("[%p] Link established", ctx); in ppp_link_established()
101 ppp_change_phase(ctx, PPP_ESTABLISH); in ppp_link_established()
103 do_auth(ctx); in ppp_link_established()
105 lcp_up(ctx); in ppp_link_established()
108 void ppp_link_authenticated(struct ppp_context *ctx) in ppp_link_authenticated() argument
110 NET_DBG("[%p] Link authenticated", ctx); in ppp_link_authenticated()
112 do_network(ctx); in ppp_link_authenticated()
115 void ppp_link_terminated(struct ppp_context *ctx) in ppp_link_terminated() argument
117 k_sem_give(&ctx->wait_ppp_link_terminated); in ppp_link_terminated()
119 if (ctx->phase == PPP_DEAD) { in ppp_link_terminated()
125 ppp_change_phase(ctx, PPP_DEAD); in ppp_link_terminated()
127 NET_DBG("[%p] Link terminated", ctx); in ppp_link_terminated()
130 void ppp_link_down(struct ppp_context *ctx) in ppp_link_down() argument
132 k_sem_give(&ctx->wait_ppp_link_down); in ppp_link_down()
134 if (ctx->phase == PPP_DEAD) { in ppp_link_down()
138 ppp_network_all_down(ctx); in ppp_link_down()
140 ppp_change_phase(ctx, PPP_DEAD); in ppp_link_down()
143 void ppp_link_needed(struct ppp_context *ctx) in ppp_link_needed() argument