net/ncsi/ncsi-pkt.h

Source file repositories/reference/linux-study-clean/net/ncsi/ncsi-pkt.h

File Facts

System
Linux kernel
Corpus path
net/ncsi/ncsi-pkt.h
Extension
.h
Size
21386 bytes
Lines
466
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct ncsi_pkt_hdr {
	unsigned char mc_id;        /* Management controller ID */
	unsigned char revision;     /* NCSI version - 0x01      */
	unsigned char reserved;     /* Reserved                 */
	unsigned char id;           /* Packet sequence number   */
	unsigned char type;         /* Packet type              */
	unsigned char channel;      /* Network controller ID    */
	__be16        length;       /* Payload length           */
	__be32        reserved1[2]; /* Reserved                 */
};

struct ncsi_cmd_pkt_hdr {
	struct ncsi_pkt_hdr common; /* Common NCSI packet header */
};

struct ncsi_rsp_pkt_hdr {
	struct ncsi_pkt_hdr common; /* Common NCSI packet header */
	__be16              code;   /* Response code             */
	__be16              reason; /* Response reason           */
};

struct ncsi_aen_pkt_hdr {
	struct ncsi_pkt_hdr common;       /* Common NCSI packet header */
	unsigned char       reserved2[3]; /* Reserved                  */
	unsigned char       type;         /* AEN packet type           */
};

/* NCSI common command packet */
struct ncsi_cmd_pkt {
	struct ncsi_cmd_pkt_hdr cmd;      /* Command header */
	__be32                  checksum; /* Checksum       */
	unsigned char           pad[26];
};

struct ncsi_rsp_pkt {
	struct ncsi_rsp_pkt_hdr rsp;      /* Response header */
	__be32                  checksum; /* Checksum        */
	unsigned char           pad[22];
};

/* Select Package */
struct ncsi_cmd_sp_pkt {
	struct ncsi_cmd_pkt_hdr cmd;            /* Command header */
	unsigned char           reserved[3];    /* Reserved       */
	unsigned char           hw_arbitration; /* HW arbitration */
	__be32                  checksum;       /* Checksum       */
	unsigned char           pad[22];
};

/* Disable Channel */
struct ncsi_cmd_dc_pkt {
	struct ncsi_cmd_pkt_hdr cmd;         /* Command header  */
	unsigned char           reserved[3]; /* Reserved        */
	unsigned char           ald;         /* Allow link down */
	__be32                  checksum;    /* Checksum        */
	unsigned char           pad[22];
};

/* Reset Channel */
struct ncsi_cmd_rc_pkt {
	struct ncsi_cmd_pkt_hdr cmd;      /* Command header */
	__be32                  reserved; /* Reserved       */
	__be32                  checksum; /* Checksum       */
	unsigned char           pad[22];
};

/* AEN Enable */
struct ncsi_cmd_ae_pkt {
	struct ncsi_cmd_pkt_hdr cmd;         /* Command header   */
	unsigned char           reserved[3]; /* Reserved         */
	unsigned char           mc_id;       /* MC ID            */
	__be32                  mode;        /* AEN working mode */
	__be32                  checksum;    /* Checksum         */
	unsigned char           pad[18];
};

/* Set Link */
struct ncsi_cmd_sl_pkt {
	struct ncsi_cmd_pkt_hdr cmd;      /* Command header    */
	__be32                  mode;     /* Link working mode */
	__be32                  oem_mode; /* OEM link mode     */
	__be32                  checksum; /* Checksum          */
	unsigned char           pad[18];
};

/* Set VLAN Filter */
struct ncsi_cmd_svf_pkt {
	struct ncsi_cmd_pkt_hdr cmd;       /* Command header    */
	__be16                  reserved;  /* Reserved          */
	__be16                  vlan;      /* VLAN ID           */

Annotation

Implementation Notes