File:  [Research Unix] / researchv9 / sys / h / inet / udp_user.h
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:21:59 2018 UTC (8 years, 1 month ago) by root
Branches: belllabs, MAIN
CVS tags: researchv9-SUN3_old, researchv9-SUN3, HEAD
researchv9-SUN3(old)

/*
 * things users need to know to talk to /dev/udp*
 * open a free udp device, write a udpuser struct on it,
 * then wait for a udpreply.
 */

/* the following is defined in kernel .h's */
#ifndef KERNEL
#include <sys/inet/in.h>
#include <sys/inet/udp.h>
#endif

struct udpuser{
	int cmd;
	int sport, dport;
	in_addr dst;
};
#define UDPC_LISTEN	1
#define UDPC_CONNECT	2
#define UDPC_DATAGRAM	3

struct udpreply{
	int reply;
	/* for listen: */
	int dport;
	in_addr dst;
	int udpdev;	/* minor device # */
};
#define UDPR_OK		1
#define UDPR_SORRY	2

struct udpaddr{
	in_addr	host;
	int port;
};

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.