Lines Matching full:ctx

14 static enum net_verdict pap_handle(struct ppp_context *ctx,  in pap_handle()  argument
18 return ppp_fsm_input(&ctx->pap.fsm, PPP_PAP, pkt); in pap_handle()
53 static void pap_lower_down(struct ppp_context *ctx) in pap_lower_down() argument
55 ppp_fsm_lower_down(&ctx->pap.fsm); in pap_lower_down()
58 static void pap_lower_up(struct ppp_context *ctx) in pap_lower_up() argument
60 ppp_fsm_lower_up(&ctx->pap.fsm); in pap_lower_up()
63 static void pap_open(struct ppp_context *ctx) in pap_open() argument
65 ppp_fsm_open(&ctx->pap.fsm); in pap_open()
68 static void pap_close(struct ppp_context *ctx, const uint8_t *reason) in pap_close() argument
70 ppp_fsm_close(&ctx->pap.fsm, reason); in pap_close()
75 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in pap_up() local
78 if (ctx->is_pap_up) { in pap_up()
82 ctx->is_pap_up = true; in pap_up()
87 ppp_link_authenticated(ctx); in pap_up()
92 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in pap_down() local
95 if (!ctx->is_pap_up) { in pap_down()
99 ctx->is_pap_up = false; in pap_down()
104 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in pap_finished() local
107 if (!ctx->is_pap_open) { in pap_finished()
111 ctx->is_pap_open = false; in pap_finished()
119 static void pap_init(struct ppp_context *ctx) in pap_init() argument
122 &ctx->pap.fsm); in pap_init()
124 memset(&ctx->pap.fsm, 0, sizeof(ctx->pap.fsm)); in pap_init()
126 ppp_fsm_init(&ctx->pap.fsm, PPP_PAP); in pap_init()
128 ppp_fsm_name_set(&ctx->pap.fsm, ppp_proto2str(PPP_PAP)); in pap_init()
130 ctx->pap.fsm.cb.up = pap_up; in pap_init()
131 ctx->pap.fsm.cb.down = pap_down; in pap_init()
132 ctx->pap.fsm.cb.finished = pap_finished; in pap_init()
133 ctx->pap.fsm.cb.proto_reject = pap_proto_reject; in pap_init()
134 ctx->pap.fsm.cb.config_info_add = pap_config_info_add; in pap_init()
135 ctx->pap.fsm.cb.config_info_ack = pap_config_info_ack; in pap_init()