xref: /csrg-svn/sys/deprecated/netpup/pup.h (revision 12826)
1*12826Ssam /*	pup.h	4.6	83/05/30	*/
25849Sroot 
3*12826Ssam struct	pupport {
4*12826Ssam 	u_char	pup_net;
5*12826Ssam 	u_char	pup_host;
6*12826Ssam 	u_char	pup_socket[4];
76027Ssam };
85849Sroot 
95849Sroot /*
105849Sroot  * PUP header.
115849Sroot  */
125849Sroot struct pup_header {
135849Sroot 	u_short	pup_length;
145849Sroot 	u_char	pup_tcontrol;		/* transport control */
155849Sroot 	u_char	pup_type;		/* protocol type */
165849Sroot 	u_long	pup_id;			/* used by protocols */
17*12826Ssam 	u_char	pup_dnet;		/* destination */
18*12826Ssam 	u_char	pup_dhost;
19*12826Ssam 	u_char	pup_dsock[4];
20*12826Ssam 	u_char	pup_snet;		/* source */
21*12826Ssam 	u_char	pup_shost;
22*12826Ssam 	u_char	pup_ssock[4];
235849Sroot };
245849Sroot 
255849Sroot #define	PUP_TRACE	01		/* trace pup in network */
266027Ssam 
27*12826Ssam #define	MINPUPSIZ	(sizeof (struct pup_header) + sizeof (short))
28*12826Ssam #define	MAXPUPDATA	532
29*12826Ssam #define	MAXPUPSIZ	(MINPUPSIZ + MAXPUPDATA)
30*12826Ssam 
31*12826Ssam #define	PUP_NOCKSUM	0xffff		/* no checksum supplied */
32*12826Ssam 
336027Ssam /*
346027Ssam  * A sockaddr, as seen through the eyes of PUP.
356027Ssam  */
366027Ssam struct sockaddr_pup {
376027Ssam 	short	spup_family;
386027Ssam 	short	spup_zero1;
39*12826Ssam 	u_char	spup_net;
40*12826Ssam 	u_char	spup_host;
41*12826Ssam 	u_char	spup_sock[4];
426027Ssam 	char	spup_zero2[4];
436027Ssam };
44