net/llc/llc_c_st.c
Source file repositories/reference/linux-study-clean/net/llc/llc_c_st.c
File Facts
- System
- Linux kernel
- Corpus path
net/llc/llc_c_st.c- Extension
.c- Size
- 156751 bytes
- Lines
- 4941
- Domain
- Networking Core
- Bucket
- Sockets, Protocols, Packet Path, And Network Policy
- Inferred role
- Networking Core: implementation source
- Status
- source implementation candidate
Why This File Exists
Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Networking stack implementation surface: socket APIs, protocol dispatch, packet flow, routing, filtering, and network namespaces.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/types.hnet/llc_if.hnet/llc_sap.hnet/llc_c_ev.hnet/llc_c_ac.hnet/llc_c_st.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0
/*
* llc_c_st.c - This module contains state transition of connection component.
*
* Description of event functions and actions there is in 802.2 LLC standard,
* or in "llc_c_ac.c" and "llc_c_ev.c" modules.
*
* Copyright (c) 1997 by Procom Technology, Inc.
* 2001-2003 by Arnaldo Carvalho de Melo <acme@conectiva.com.br>
*/
#include <linux/types.h>
#include <net/llc_if.h>
#include <net/llc_sap.h>
#include <net/llc_c_ev.h>
#include <net/llc_c_ac.h>
#include <net/llc_c_st.h>
#define NONE NULL
/* COMMON CONNECTION STATE transitions
* Common transitions for
* LLC_CONN_STATE_NORMAL,
* LLC_CONN_STATE_BUSY,
* LLC_CONN_STATE_REJ,
* LLC_CONN_STATE_AWAIT,
* LLC_CONN_STATE_AWAIT_BUSY and
* LLC_CONN_STATE_AWAIT_REJ states
*/
/* State transitions for LLC_CONN_EV_DISC_REQ event */
static const llc_conn_action_t llc_common_actions_1[] = {
[0] = llc_conn_ac_send_disc_cmd_p_set_x,
[1] = llc_conn_ac_start_ack_timer,
[2] = llc_conn_ac_stop_other_timers,
[3] = llc_conn_ac_set_retry_cnt_0,
[4] = llc_conn_ac_set_cause_flag_1,
[5] = NULL,
};
static const struct llc_conn_state_trans llc_common_state_trans_1 = {
.ev = llc_conn_ev_disc_req,
.next_state = LLC_CONN_STATE_D_CONN,
.ev_qualifiers = NONE,
.ev_actions = llc_common_actions_1,
};
/* State transitions for LLC_CONN_EV_RESET_REQ event */
static const llc_conn_action_t llc_common_actions_2[] = {
[0] = llc_conn_ac_send_sabme_cmd_p_set_x,
[1] = llc_conn_ac_start_ack_timer,
[2] = llc_conn_ac_stop_other_timers,
[3] = llc_conn_ac_set_retry_cnt_0,
[4] = llc_conn_ac_set_cause_flag_1,
[5] = NULL,
};
static const struct llc_conn_state_trans llc_common_state_trans_2 = {
.ev = llc_conn_ev_rst_req,
.next_state = LLC_CONN_STATE_RESET,
.ev_qualifiers = NONE,
.ev_actions = llc_common_actions_2,
};
/* State transitions for LLC_CONN_EV_RX_SABME_CMD_Pbit_SET_X event */
static const llc_conn_action_t llc_common_actions_3[] = {
[0] = llc_conn_ac_stop_all_timers,
[1] = llc_conn_ac_set_vs_0,
[2] = llc_conn_ac_set_vr_0,
[3] = llc_conn_ac_send_ua_rsp_f_set_p,
[4] = llc_conn_ac_rst_ind,
[5] = llc_conn_ac_set_p_flag_0,
[6] = llc_conn_ac_set_remote_busy_0,
[7] = llc_conn_reset,
[8] = NULL,
};
static const struct llc_conn_state_trans llc_common_state_trans_3 = {
.ev = llc_conn_ev_rx_sabme_cmd_pbit_set_x,
.next_state = LLC_CONN_STATE_NORMAL,
.ev_qualifiers = NONE,
.ev_actions = llc_common_actions_3,
};
/* State transitions for LLC_CONN_EV_RX_DISC_CMD_Pbit_SET_X event */
static const llc_conn_action_t llc_common_actions_4[] = {
[0] = llc_conn_ac_stop_all_timers,
[1] = llc_conn_ac_send_ua_rsp_f_set_p,
[2] = llc_conn_ac_disc_ind,
[3] = llc_conn_disc,
[4] = NULL,
};
Annotation
- Immediate include surface: `linux/types.h`, `net/llc_if.h`, `net/llc_sap.h`, `net/llc_c_ev.h`, `net/llc_c_ac.h`, `net/llc_c_st.h`.
- Atlas domain: Networking Core / Sockets, Protocols, Packet Path, And Network Policy.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.