'\" t .\" Title: dev_forward_skb .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: January 2017 .\" Manual: Network device support .\" Source: Kernel Hackers Manual 4.8.15 .\" Language: English .\" .TH "DEV_FORWARD_SKB" "9" "January 2017" "Kernel Hackers Manual 4\&.8\&." "Network device support" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" dev_forward_skb \- loopback an skb to another netif .SH "SYNOPSIS" .HP \w'int\ dev_forward_skb('u .BI "int dev_forward_skb(struct\ net_device\ *\ " "dev" ", struct\ sk_buff\ *\ " "skb" ");" .SH "ARGUMENTS" .PP \fIdev\fR .RS 4 destination network device .RE .PP \fIskb\fR .RS 4 buffer to forward .RE .SH "DESCRIPTION" .PP return values: NET_RX_SUCCESS (no congestion) NET_RX_DROP (packet was dropped, but freed) .PP dev_forward_skb can be used for injecting an skb from the start_xmit function of one device into the receive queue of another device\&. .PP The receiving device may be in another namespace, so we have to clear all information in the skb that could impact namespace isolation\&. .SH "COPYRIGHT" .br