net/llc/llc_c_ev.c
Source file repositories/reference/linux-study-clean/net/llc/llc_c_ev.c
File Facts
- System
- Linux kernel
- Corpus path
net/llc/llc_c_ev.c- Extension
.c- Size
- 21479 bytes
- Lines
- 743
- 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/netdevice.hnet/llc_conn.hnet/llc_sap.hnet/sock.hnet/llc_c_ac.hnet/llc_c_ev.hnet/llc_pdu.h
Detected Declarations
function madefunction llc_util_nr_inside_tx_windowfunction llc_conn_ev_conn_reqfunction llc_conn_ev_data_reqfunction llc_conn_ev_disc_reqfunction llc_conn_ev_rst_reqfunction llc_conn_ev_local_busy_detectedfunction llc_conn_ev_local_busy_clearedfunction llc_conn_ev_rx_bad_pdufunction llc_conn_ev_rx_disc_cmd_pbit_set_xfunction llc_conn_ev_rx_dm_rsp_fbit_set_xfunction llc_conn_ev_rx_frmr_rsp_fbit_set_xfunction llc_conn_ev_rx_i_cmd_pbit_set_0function llc_conn_ev_rx_i_cmd_pbit_set_1function llc_conn_ev_rx_i_cmd_pbit_set_0_unexpd_nsfunction llc_conn_ev_rx_i_cmd_pbit_set_1_unexpd_nsfunction llc_conn_ev_rx_i_cmd_pbit_set_x_inval_nsfunction llc_conn_ev_rx_i_rsp_fbit_set_0function llc_conn_ev_rx_i_rsp_fbit_set_1function llc_conn_ev_rx_i_rsp_fbit_set_xfunction llc_conn_ev_rx_i_rsp_fbit_set_0_unexpd_nsfunction llc_conn_ev_rx_i_rsp_fbit_set_1_unexpd_nsfunction llc_conn_ev_rx_i_rsp_fbit_set_x_unexpd_nsfunction llc_conn_ev_rx_i_rsp_fbit_set_x_inval_nsfunction llc_conn_ev_rx_rej_cmd_pbit_set_0function llc_conn_ev_rx_rej_cmd_pbit_set_1function llc_conn_ev_rx_rej_rsp_fbit_set_0function llc_conn_ev_rx_rej_rsp_fbit_set_1function llc_conn_ev_rx_rej_rsp_fbit_set_xfunction llc_conn_ev_rx_rnr_cmd_pbit_set_0function llc_conn_ev_rx_rnr_cmd_pbit_set_1function llc_conn_ev_rx_rnr_rsp_fbit_set_0function llc_conn_ev_rx_rnr_rsp_fbit_set_1function llc_conn_ev_rx_rr_cmd_pbit_set_0function llc_conn_ev_rx_rr_cmd_pbit_set_1function llc_conn_ev_rx_rr_rsp_fbit_set_0function llc_conn_ev_rx_rr_rsp_fbit_set_1function llc_conn_ev_rx_sabme_cmd_pbit_set_xfunction llc_conn_ev_rx_ua_rsp_fbit_set_xfunction llc_conn_ev_rx_xxx_cmd_pbit_set_1function llc_conn_ev_rx_xxx_cmd_pbit_set_xfunction llc_conn_ev_rx_xxx_rsp_fbit_set_xfunction llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nrfunction llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nrfunction llc_conn_ev_rx_any_framefunction llc_conn_ev_p_tmr_expfunction llc_conn_ev_ack_tmr_expfunction llc_conn_ev_rej_tmr_exp
Annotated Snippet
if (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) {
if (LLC_I_PF_IS_1(pdu))
rc = 0;
} else if (LLC_PDU_TYPE_IS_U(pdu) && LLC_U_PF_IS_1(pdu))
rc = 0;
}
return rc;
}
int llc_conn_ev_rx_xxx_cmd_pbit_set_x(struct sock *sk, struct sk_buff *skb)
{
u16 rc = 1;
const struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb);
if (LLC_PDU_IS_CMD(pdu)) {
if (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu))
rc = 0;
else if (LLC_PDU_TYPE_IS_U(pdu))
switch (LLC_U_PDU_CMD(pdu)) {
case LLC_2_PDU_CMD_SABME:
case LLC_2_PDU_CMD_DISC:
rc = 0;
break;
}
}
return rc;
}
int llc_conn_ev_rx_xxx_rsp_fbit_set_x(struct sock *sk, struct sk_buff *skb)
{
u16 rc = 1;
const struct llc_pdu_un *pdu = llc_pdu_un_hdr(skb);
if (LLC_PDU_IS_RSP(pdu)) {
if (LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu))
rc = 0;
else if (LLC_PDU_TYPE_IS_U(pdu))
switch (LLC_U_PDU_RSP(pdu)) {
case LLC_2_PDU_RSP_UA:
case LLC_2_PDU_RSP_DM:
case LLC_2_PDU_RSP_FRMR:
rc = 0;
break;
}
}
return rc;
}
int llc_conn_ev_rx_zzz_cmd_pbit_set_x_inval_nr(struct sock *sk,
struct sk_buff *skb)
{
u16 rc = 1;
const struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
const u8 vs = llc_sk(sk)->vS;
const u8 nr = LLC_I_GET_NR(pdu);
if (LLC_PDU_IS_CMD(pdu) &&
(LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) &&
nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
__func__, llc_sk(sk)->state, vs, nr);
rc = 0;
}
return rc;
}
int llc_conn_ev_rx_zzz_rsp_fbit_set_x_inval_nr(struct sock *sk,
struct sk_buff *skb)
{
u16 rc = 1;
const struct llc_pdu_sn *pdu = llc_pdu_sn_hdr(skb);
const u8 vs = llc_sk(sk)->vS;
const u8 nr = LLC_I_GET_NR(pdu);
if (LLC_PDU_IS_RSP(pdu) &&
(LLC_PDU_TYPE_IS_I(pdu) || LLC_PDU_TYPE_IS_S(pdu)) &&
nr != vs && llc_util_nr_inside_tx_window(sk, nr)) {
rc = 0;
dprintk("%s: matched, state=%d, vs=%d, nr=%d\n",
__func__, llc_sk(sk)->state, vs, nr);
}
return rc;
}
int llc_conn_ev_rx_any_frame(struct sock *sk, struct sk_buff *skb)
{
return 0;
}
Annotation
- Immediate include surface: `linux/netdevice.h`, `net/llc_conn.h`, `net/llc_sap.h`, `net/sock.h`, `net/llc_c_ac.h`, `net/llc_c_ev.h`, `net/llc_pdu.h`.
- Detected declarations: `function made`, `function llc_util_nr_inside_tx_window`, `function llc_conn_ev_conn_req`, `function llc_conn_ev_data_req`, `function llc_conn_ev_disc_req`, `function llc_conn_ev_rst_req`, `function llc_conn_ev_local_busy_detected`, `function llc_conn_ev_local_busy_cleared`, `function llc_conn_ev_rx_bad_pdu`, `function llc_conn_ev_rx_disc_cmd_pbit_set_x`.
- 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.