net_xmit Kernel Service

Purpose

Transmits data using a communications device handler .

Syntax

#include <sys/types.h>
#include <sys/errno.h>
#include <aixif/net_if.h>

int net_xmit (ifp, m, netfp, lngth, m_ext)
struct  ifnet * ifp;
struct  mbuf * m;
struct  file * netfp;
int   lngth;
struct mbuf * m_ext;

Parameters

Item Description
ifp Indicates an address of the ifnet structure for this interface.
m Specifies the address of an mbuf structure containing the data to transmit.
netfp Indicates the open file pointer obtained from the net_attach kernel service.
lngth Indicates the total length of the buffer being transmitted.
m_ext Indicates the address of an mbuf structure containing a write extension.

Description

The net_xmit kernel service builds a uio structure and then invokes the fp_rwuio service to transmit a packet. The net_xmit_trace kernel service is an alternative for network interfaces that choose not to use the net_xmit kernel service.

Execution Environment

The net_xmit kernel service can be called from either the process or interrupt environment.

Return Values

Item Description
0 Indicates that the packet was transmitted successfully.
ENOBUFS Indicates that buffer resources were not available.

The net_xmit kernel service returns a value from the fp_rwuio service when an error occurs during a call to that service.