ftp.nice.ch/pub/next/developer/resources/libraries/eni.a.tar.gz#/doc/eni_send_packet.man

This is eni_send_packet.man in view mode; [Download] [Up]

.\" @(#)eni_send_packet.l 1.0 22Sep91 McGill SOCS
.TH ENI_SEND_PACKET L "22 September 1991"
.SH NAME
eni_send_packet \- put a packet on the network via the Ethernet front\-end
.SH SYNOPSIS
.nf
.ft B
#include <libeni.h>
.PP
int eni_send_packet(dst_addr, frame_type, data, dlen)
unsigned char *dst_addr ;
unsigned short frame_type ;
void *data ;
int dlen ;
.fi
.ft R
.SH DESCRIPTION
.I eni_send_packet
passes a packet to the kernel to be sent out over the Ethernet.  The
destination address is given by
.I dst_addr,
an array of six bytes.  The Ethernet frame type is specified by
.I frame_type
and the data is contained in a buffer pointed to by
.I data.
Only the first
.I dlen
bytes of data are transmitted.  The constant
.B ENI_MTU
is an upper limit on the amount of data that may be put in one packet.
.PP
It is not necessary to specify other parts of the packet, such as the source
address or the checksum, as these are filled in by the device driver.
.PP
It should also be noted that the destination address and the frame type
should be in network byte order, which places the most significant byte at the
lowest address.
.SH "RETURN VALUES"
.I eni_send_packet
returns 0 if it is successful, otherwise it returns -1.  In the latter case
the external variable
.I eni_errno
is set to one of the following values:
.TP 15
[ENOINIT]
.B eni_init
has not been called, or was unsuccessful.
.TP 15
[ENXIO]
error communicating with the loadable kernel server.
.TP 15
[E2BIG]
.I dlen
is greater than
.B ENI_MTU
.TP 15
[ENOBUFS]
the loadable kernel server failed to allocate necessary storage, or
encountered an error using existing storage.
.TP 15
[ENODEV]
error telling the device driver to output the packet.
.TP 15
[EIO]
an unknown error from the device driver.
.SH "SEE ALSO"
eni_get_packet(L), eni_init(L)
.SH AUTHOR
Bill Heelan, McGill University SOCS

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.