header_ops
net->header_ops = &fwnet_header_ops;
static const struct header_ops fwnet_header_ops = {
dev->header_ops = &phonet_header_ops;
static const struct header_ops ipoib_header_ops = {
dev->header_ops = &ipoib_header_ops;
static const struct header_ops dvb_header_ops = {
dev->header_ops = &dvb_header_ops;
static const struct header_ops arcnet_header_ops = {
dev->header_ops = &arcnet_header_ops;
const struct header_ops *slave_ops;
slave_ops = READ_ONCE(slave->dev->header_ops);
const struct header_ops *slave_ops;
slave_ops = READ_ONCE(slave->dev->header_ops);
static const struct header_ops bond_header_ops = {
bond_dev->header_ops = slave_dev->header_ops ?
rmnet_dev->header_ops = NULL; /* No header */
dev->header_ops = NULL;
dev->header_ops = &ax25_header_ops;
dev->header_ops = &ax25_header_ops;
dev->header_ops = &ax25_header_ops;
dev->header_ops = &ax25_header_ops;
dev->header_ops = &ax25_header_ops;
dev->header_ops = &ax25_header_ops;
dev->header_ops = &ax25_header_ops;
netdev->header_ops = NULL;
static const struct header_ops ipvlan_header_ops = {
dev->header_ops = &ipvlan_header_ops;
const struct header_ops *hdr_ops,
dev->header_ops = hdr_ops;
dev->header_ops = &macvlan_hard_header_ops;
static const struct header_ops macvlan_hard_header_ops = {
static const struct header_ops mctp_i2c_headops = {
dev->header_ops = &mctp_i2c_headops;
static const struct header_ops mctp_i3c_headops = {
dev->header_ops = &mctp_i3c_headops;
ndev->header_ops = NULL; /* No header */
static const struct header_ops plip_header_ops = {
dev->header_ops = &plip_header_ops;
const struct header_ops *port_ops;
port_ops = READ_ONCE(port->dev->header_ops);
const struct header_ops *port_ops;
port_ops = READ_ONCE(port->dev->header_ops);
static const struct header_ops team_header_ops = {
dev->header_ops = team->header_ops_cache;
dev->header_ops = port_dev->header_ops ?
team->header_ops_cache = dev->header_ops;
dev->header_ops = &ip_tunnel_header_ops;
dev->header_ops = &phonet_header_ops;
dev->header_ops = NULL; /* No header */
net->header_ops = NULL; /* No header */
} else if (!net->header_ops) { /* don't bother if already set */
if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
dev->header_ops = NULL;
static const struct header_ops hdlc_null_ops;
dev->header_ops = &hdlc_null_ops;
static const struct header_ops cisco_header_ops = {
dev->header_ops = &cisco_header_ops;
static const struct header_ops ppp_header_ops = {
dev->header_ops = &ppp_header_ops;
dev->header_ops = &ip_tunnel_header_ops;
iosm_dev->header_ops = NULL;
ndev->header_ops = NULL; /* No header */
dev->header_ops = &phonet_header_ops;
extern const struct header_ops eth_header_ops;
extern const struct header_ops phonet_header_ops;
const struct header_ops *header_ops_cache;
const struct header_ops *header_ops;
if (!dev->header_ops || !dev->header_ops->create)
return dev->header_ops->create(skb, dev, type, daddr, saddr, len);
if (!dev->header_ops || !dev->header_ops->parse)
return dev->header_ops->parse(skb, dev, haddr);
if (!dev->header_ops || !dev->header_ops->parse_protocol)
return dev->header_ops->parse_protocol(skb);
if (dev->header_ops && dev->header_ops->validate)
return dev->header_ops->validate(ll_header, len);
return dev->header_ops && dev->header_ops->create;
extern const struct header_ops ax25_header_ops;
const struct wpan_dev_header_ops *header_ops;
return wpan_dev->header_ops->create(skb, dev, daddr, saddr, len);
extern const struct header_ops ip_tunnel_header_ops;
static const struct header_ops fc_header_ops = {
dev->header_ops = &fc_header_ops;
static const struct header_ops fddi_header_ops = {
dev->header_ops = &fddi_header_ops;
static const struct header_ops vlan_header_ops = {
static const struct header_ops vlan_passthru_header_ops = {
dev->header_ops = &vlan_passthru_header_ops;
dev->header_ops = &vlan_header_ops;
const struct header_ops ax25_header_ops = {
static const struct header_ops header_ops = {
dev->header_ops = &header_ops;
CACHELINE_ASSERT_GROUP_MEMBER(struct net_device, net_device_read_tx, header_ops);
if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
if (neigh->dev->header_ops)
update = neigh->dev->header_ops->cache_update;
dev->header_ops->cache(n, hh, prot);
if (dev->header_ops->cache && !READ_ONCE(neigh->hh.hh_len))
const struct header_ops eth_header_ops ____cacheline_aligned = {
dev->header_ops = ð_header_ops;
static const struct header_ops hsr_header_ops = {
dev->header_ops = &hsr_header_ops;
ldev->header_ops = &lowpan_header_ops;
static const struct header_ops lowpan_header_ops = {
if (!dev->header_ops) {
if (dev->header_ops->cache)
dev->header_ops = &ipgre_header_ops;
dev->header_ops = &ipgre_header_ops;
static const struct header_ops ipgre_header_ops;
if (tunnel->dev->header_ops == &ipgre_header_ops)
if (dev->header_ops) {
if (dev->header_ops)
static const struct header_ops ipgre_header_ops = {
if (unlikely(skb_headroom(skb) < hh_len && dev->header_ops)) {
const struct header_ops ip_tunnel_header_ops = { .parse_protocol = ip_tunnel_parse_protocol };
dev->header_ops = &ip_tunnel_header_ops;
dev->header_ops = &ip_tunnel_header_ops;
if (t->dev->header_ops)
if (tunnel->dev->header_ops)
static const struct header_ops ip6gre_header_ops = {
dev->header_ops = &ip6gre_header_ops;
if (dev->header_ops && dev->type == ARPHRD_IP6GRE)
if (unlikely(hh_len > skb_headroom(skb)) && dev->header_ops) {
dev->header_ops = &ip_tunnel_header_ops;
dev->header_ops = &ip_tunnel_header_ops;
if (!dev->header_ops) {
if (dev->header_ops->cache)
if (neigh || !dev->header_ops) {
dev->header_ops = &ip_tunnel_header_ops;
static const struct header_ops mac802154_header_ops = {
sdata->dev->header_ops = &mac802154_header_ops;
wpan_dev->header_ops = &ieee802154_header_ops;
const struct header_ops ops = {
dev->ndev->header_ops = &ops;
if (!out_dev->header_ops)
if (!out_dev->header_ops)
static const struct header_ops nr_header_ops = {
dev->header_ops = &nr_header_ops;
unsigned int hhlen = dev->header_ops ? dev->hard_header_len : 0;
const struct header_ops phonet_header_ops = {
static const struct header_ops rose_header_ops = {
dev->header_ops = &rose_header_ops;
if (!dev->header_ops || !dst)
dev->header_ops = &ip_tunnel_header_ops;