Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ intro(4P) — SunOS 0.4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

net(4)

pup(4f)

INTRO(4P)  —  System Manager’s Manual — Special Files

NAME

pup − raw PUP socket interface

SYNOPSIS

#include <sys/socket.h>
#include <netpup/pup.h>

struct sockopt options;
int proto = PUPPROTO_BSP;

socket(AF_PUP, SOCK_RAW, proto, &options);

DESCRIPTION

The raw pup socket provides nearly direct access to an (experimental) Ethernet network interface.  Users send packets through the interface using the sendto(2) call, and receive packets with the recvfrom(2) call.  All outgoing packets must have space present at the front of the packet to allow the PUP header to be filled in.  The header format is described in pup(4f). Likewise, packets received by the user will have the PUP header on the front.  The PUP header and legal values for the various fields are defined in the include file <netpup/pup.h>.

The raw pup interface automatically installs the length and source and destination addresses in the PUP header of all outgoing packets; these need not be filled in by the user.  The only control bit that may be set in the tcontrol field of outgoing packets is the “trace” bit. 

DIAGNOSTICS

EISCONN when trying to establish a connection on a socket which already has one, or when trying to send a datagram with the destination address specified and the socket is already connected;

ENOTCONN when trying to send a datagram, but no destination address is specified, and the socket hasn’t been connected;

ENOBUFS when the system runs out of memory for an internal data structure;

EADDRNOTAVAIL when an attempt is made to create a socket with a network address for which no network interface exists. 

SEE ALSO

net(4), pup(4f)

Sun System Release 0.3  —  18 April 1983

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026