2
* Copyright (c) 1990,1991 Regents of The University of Michigan.
5
* Permission to use, copy, modify, and distribute this software and
6
* its documentation for any purpose and without fee is hereby granted,
7
* provided that the above copyright notice appears in all copies and
8
* that both that copyright notice and this permission notice appear
9
* in supporting documentation, and that the name of The University
10
* of Michigan not be used in advertising or publicity pertaining to
11
* distribution of the software without specific, written prior
12
* permission. This software is supplied as is without expressed or
13
* implied warranties of any kind.
15
* Research Systems Unix Group
16
* The University of Michigan
18
* 535 W. William Street
21
* netatalk@itd.umich.edu
25
#define _ATALK_ASP_H 1
27
#include <sys/types.h>
28
#include <sys/cdefs.h>
29
#include <netatalk/endian.h>
30
#include <netatalk/at.h>
31
#include <atalk/atp.h>
32
#include <atalk/afp.h>
33
#include <atalk/server_child.h>
36
#define ASP_CMDSIZ 578
38
#define ASP_MAXPACKETS 8
39
#define ASP_CMDMAXSIZ (ASP_CMDSIZ + ASP_HDRSIZ)
40
#define ASP_DATASIZ (ASP_CMDSIZ*ASP_MAXPACKETS)
41
#define ASP_DATAMAXSIZ ((ASP_CMDSIZ + ASP_HDRSIZ)*ASP_MAXPACKETS)
45
struct sockaddr_at asp_sat;
55
#define asp_status asp_u.asu_status.as_status
56
#define asp_slen asp_u.asu_status.as_slen
57
#define asp_seq asp_u.asu_seq
59
char child, inited, *commands;
60
char cmdbuf[ASP_CMDMAXSIZ];
61
char data[ASP_DATAMAXSIZ];
63
size_t read_count, write_count;
69
#define ASPFUNC_CLOSE 1
71
#define ASPFUNC_STAT 3
72
#define ASPFUNC_OPEN 4
73
#define ASPFUNC_TICKLE 5
74
#define ASPFUNC_WRITE 6
75
#define ASPFUNC_WRTCONT 7
76
#define ASPFUNC_ATTN 8
78
#define ASPERR_OK 0x0000
79
#define ASPERR_BADVERS 0xfbd6
80
#define ASPERR_BUFSMALL 0xfbd5
81
#define ASPERR_NOSESS 0xfbd4
82
#define ASPERR_NOSERV 0xfbd3
83
#define ASPERR_PARM 0xfbd2
84
#define ASPERR_SERVBUSY 0xfbd1
85
#define ASPERR_SESSCLOS 0xfbd0
86
#define ASPERR_SIZERR 0xfbcf
87
#define ASPERR_TOOMANY 0xfbce
88
#define ASPERR_NOACK 0xfbcd
90
extern ASP asp_init __P((ATP));
91
extern void asp_setstatus __P((ASP, char *, const int));
92
extern ASP asp_getsession __P((ASP, server_child *, const int));
93
extern int asp_close __P((ASP));
94
extern int asp_shutdown __P((ASP));
95
extern int asp_attention __P((ASP, AFPUserBytes));
96
extern int asp_getrequest __P((ASP));
97
extern int asp_cmdreply __P((ASP, int));
98
extern int asp_wrtcont __P((ASP, char *, int *));
99
#define asp_wrtreply(a,b) asp_cmdreply((a), (b))
100
extern void asp_kill __P((int));
101
extern void asp_tickle __P((ASP, const u_int8_t, struct sockaddr_at *));