Lines Matching refs:fsm

24 	return ppp_fsm_input(&ctx->ipv6cp.fsm, PPP_IPV6CP, pkt);  in ipv6cp_handle()
81 static struct net_pkt *ipv6cp_config_info_add(struct ppp_fsm *fsm) in ipv6cp_config_info_add() argument
83 return ppp_my_options_add(fsm, INTERFACE_IDENTIFIER_OPTION_LEN); in ipv6cp_config_info_add()
91 static int ipv6cp_interface_identifier_parse(struct ppp_fsm *fsm, in ipv6cp_interface_identifier_parse() argument
111 fsm->name, fsm, "peer ", iid_str); in ipv6cp_interface_identifier_parse()
124 static int ipv6cp_config_info_req(struct ppp_fsm *fsm, in ipv6cp_config_info_req() argument
130 CONTAINER_OF(fsm, struct ppp_context, ipv6cp.fsm); in ipv6cp_config_info_req()
136 ret = ppp_config_info_req(fsm, pkt, length, ret_pkt, PPP_IPV6CP, in ipv6cp_config_info_req()
156 static int ipv6cp_config_info_ack(struct ppp_fsm *fsm, in ipv6cp_config_info_ack() argument
162 ret = ppp_my_options_parse_conf_ack(fsm, pkt, length); in ipv6cp_config_info_ack()
167 if (!ppp_my_option_is_acked(fsm, IPV6CP_OPTION_INTERFACE_IDENTIFIER)) { in ipv6cp_config_info_ack()
173 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in ipv6cp_config_info_ack()
174 ipv6cp.fsm); in ipv6cp_config_info_ack()
183 fsm->name, fsm, "", iid_str); in ipv6cp_config_info_ack()
191 ppp_fsm_lower_down(&ctx->ipv6cp.fsm); in ipv6cp_lower_down()
196 ppp_fsm_lower_up(&ctx->ipv6cp.fsm); in ipv6cp_lower_up()
201 ppp_fsm_open(&ctx->ipv6cp.fsm); in ipv6cp_open()
206 ppp_fsm_close(&ctx->ipv6cp.fsm, reason); in ipv6cp_close()
240 static void ipv6cp_up(struct ppp_fsm *fsm) in ipv6cp_up() argument
242 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in ipv6cp_up()
243 ipv6cp.fsm); in ipv6cp_up()
256 NET_DBG("[%s/%p] Current state %s (%d)", fsm->name, fsm, in ipv6cp_up()
257 ppp_state_str(fsm->state), fsm->state); in ipv6cp_up()
274 fsm->name, fsm, in ipv6cp_up()
290 fsm->name, fsm, addr_str, in ipv6cp_up()
296 static void ipv6cp_down(struct ppp_fsm *fsm) in ipv6cp_down() argument
298 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in ipv6cp_down()
299 ipv6cp.fsm); in ipv6cp_down()
329 fsm->name, fsm, in ipv6cp_down()
345 fsm->name, fsm, addr_str, in ipv6cp_down()
351 static void ipv6cp_finished(struct ppp_fsm *fsm) in ipv6cp_finished() argument
353 struct ppp_context *ctx = CONTAINER_OF(fsm, struct ppp_context, in ipv6cp_finished()
354 ipv6cp.fsm); in ipv6cp_finished()
365 static void ipv6cp_proto_reject(struct ppp_fsm *fsm) in ipv6cp_proto_reject() argument
367 ppp_fsm_lower_down(fsm); in ipv6cp_proto_reject()
373 PPP_IPV6CP, &ctx->ipv6cp.fsm); in ipv6cp_init()
375 memset(&ctx->ipv6cp.fsm, 0, sizeof(ctx->ipv6cp.fsm)); in ipv6cp_init()
377 ppp_fsm_init(&ctx->ipv6cp.fsm, PPP_IPV6CP); in ipv6cp_init()
379 ppp_fsm_name_set(&ctx->ipv6cp.fsm, ppp_proto2str(PPP_IPV6CP)); in ipv6cp_init()
381 ctx->ipv6cp.fsm.my_options.info = ipv6cp_my_options; in ipv6cp_init()
382 ctx->ipv6cp.fsm.my_options.data = ctx->ipv6cp.my_options_data; in ipv6cp_init()
383 ctx->ipv6cp.fsm.my_options.count = ARRAY_SIZE(ipv6cp_my_options); in ipv6cp_init()
385 ctx->ipv6cp.fsm.cb.up = ipv6cp_up; in ipv6cp_init()
386 ctx->ipv6cp.fsm.cb.down = ipv6cp_down; in ipv6cp_init()
387 ctx->ipv6cp.fsm.cb.finished = ipv6cp_finished; in ipv6cp_init()
388 ctx->ipv6cp.fsm.cb.proto_reject = ipv6cp_proto_reject; in ipv6cp_init()
389 ctx->ipv6cp.fsm.cb.config_info_ack = ipv6cp_config_info_ack; in ipv6cp_init()
390 ctx->ipv6cp.fsm.cb.config_info_rej = ppp_my_options_parse_conf_rej; in ipv6cp_init()
391 ctx->ipv6cp.fsm.cb.config_info_add = ipv6cp_config_info_add; in ipv6cp_init()
392 ctx->ipv6cp.fsm.cb.config_info_req = ipv6cp_config_info_req; in ipv6cp_init()