netatalk  4.4.0dev
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
asp.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
3 * All Rights Reserved.
4 *
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.
14 *
15 * Research Systems Unix Group
16 * The University of Michigan
17 * c/o Mike Clark
18 * 535 W. William Street
19 * Ann Arbor, Michigan
20 * +1-313-763-0525
22 */
23
24#ifndef _ATALK_ASP_H
25#define _ATALK_ASP_H 1
26
27#ifndef NO_DDP
28
29#include <sys/types.h>
30#include <netatalk/at.h>
31#include <atalk/atp.h>
32#include <atalk/afp.h>
33#include <atalk/server_child.h>
34
35#define ASP_HDRSIZ 4
36#define ASP_CMDSIZ 578
37
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)
42
43typedef struct ASP {
46 uint8_t asp_wss;
47 uint8_t asp_sid;
48 union {
49 struct {
50 char *as_status;
52 } asu_status;
53 uint16_t asu_seq;
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
62 size_t cmdlen, datalen;
64} *ASP;
65
66#define ASPFL_SLS 1
67#define ASPFL_SSS 2
68
69#define ASPFUNC_CLOSE 1
70#define ASPFUNC_CMD 2
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
77
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
89
90extern ASP asp_init(ATP);
91extern void asp_setstatus(ASP, char *, const int);
92extern ASP asp_getsession(ASP, server_child_t *, const int);
93extern int asp_close(ASP);
94extern int asp_shutdown(ASP);
95extern int asp_attention(ASP, AFPUserBytes);
96extern int asp_getrequest(ASP);
97extern int asp_cmdreply(ASP, int);
98extern int asp_wrtcont(ASP, char *, size_t *);
99#define asp_wrtreply(a,b) asp_cmdreply((a), (b))
100extern void asp_kill(int);
101extern int asp_tickle(ASP, const uint8_t, struct sockaddr_at *);
102extern void asp_stop_tickle(void);
103
104#endif /* NO_DDP */
105#endif
void asp_stop_tickle(void)
Definition asp_getsess.c:87
int asp_attention(ASP, AFPUserBytes)
Definition asp_attn.c:24
void asp_kill(int)
Definition asp_getsess.c:80
int asp_shutdown(ASP)
Definition asp_shutdown.c:18
int asp_close(ASP)
Definition asp_close.c:39
int asp_wrtcont(ASP, char *, size_t *)
Definition asp_write.c:35
ASP asp_getsession(ASP, server_child_t *, const int)
Definition asp_getsess.c:103
#define ASP_DATAMAXSIZ
Definition asp.h:41
#define ASP_CMDMAXSIZ
Definition asp.h:39
void asp_setstatus(ASP, char *, const int)
Definition asp_init.c:65
int asp_getrequest(ASP)
Definition asp_getreq.c:37
ASP asp_init(ATP)
Definition asp_init.c:39
int asp_cmdreply(ASP, int)
Definition asp_cmdreply.c:36
int asp_tickle(ASP, const uint8_t, struct sockaddr_at *)
Definition asp_tickle.c:15
struct atp_handle * ATP
Definition atp.h:116
uint16_t AFPUserBytes
Definition include/atalk/afp.h:30
Definition asp.h:43
struct sockaddr_at asp_sat
Definition asp.h:45
uint16_t asu_seq
Definition asp.h:53
char * as_status
Definition asp.h:50
char cmdbuf[ASP_CMDMAXSIZ]
Definition asp.h:60
ATP asp_atp
Definition asp.h:44
size_t cmdlen
Definition asp.h:62
union ASP::@170102234267300145130262072244233150200344244333 asp_u
size_t datalen
Definition asp.h:62
char inited
Definition asp.h:59
int as_slen
Definition asp.h:51
char data[ASP_DATAMAXSIZ]
Definition asp.h:61
int asp_flags
Definition asp.h:58
off_t read_count
Definition asp.h:63
char child
Definition asp.h:59
off_t write_count
Definition asp.h:63
uint8_t asp_wss
Definition asp.h:46
char * commands
Definition asp.h:59
uint8_t asp_sid
Definition asp.h:47
Definition server_child.h:47
Definition at.h:88