skb_eth_push(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

skb_eth_push(9) β€” Kernel API Manual ✨

Okay bestie, gather round β€” we're in the Kernel API Manual and this page is all about skb_eth_push(9), and yes it's lowkey iconic. πŸ’–


🌸 NAME 🌸

skb_eth_push β€” Add a new Ethernet header at the head of a packet. Periodt. πŸŽ€


✨ SYNOPSIS ✨

int skb_eth_push (struct sk_buff *skb , const unsigned char *dst , const
       unsigned char *src );

πŸŽ€ ARGUMENTS πŸŽ€

  • skb β€” Socket buffer to modify. This is the main character you're about to glow up. πŸ’…
  • dst β€” Destination MAC address of the new header. Put it right where it belongs. πŸ¦‹
  • src β€” Source MAC address of the new header. Yes bestie, source matters too. ✨

πŸ’… DESCRIPTION πŸ’…

Prepend skb with a new Ethernet header. That's the move. No cap. πŸ’–

It expects that skb->data points to the mac header, which must be empty. That's the vibe check, and it is not optional. 🚨

Returns 0 on success, -errno otherwise. So if it's not 0, it's giving error energy β€” literally -errno, iykyk. 😭

🫢 Bestie note: the mac header has to be empty, fr fr. Don't make it weird.

πŸ‘‘ SEE ALSO πŸ‘‘

All the lore lives in the kernel file ./net/core/skbuff.c β€” and here are all the sibling functions, exactly as they appear, because we don't skip the boring parts in this house. πŸ’–

🫢 That's the tea from ./net/core β€” Kernel API Manual, October 2026, for skb_eth_push(9). Stay slaying, bestie. πŸ’…
πŸ“¦ where this page comes from