netatalk 4.5.0
Free and Open Source Apple Filing Protocol (AFP) Server
Loading...
Searching...
No Matches
comment.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 1990,1991 Regents of The University of Michigan.
3 * All Rights Reserved. See COPYRIGHT.
4 */
5
6#ifndef PAPD_COMMENT_H
7#define PAPD_COMMENT_H 1
8
9#include <sys/types.h>
10
11 struct papfile;
12 struct sockaddr_at;
13
14 struct papd_comment {
15 char *c_begin;
16 char *c_end;
17 int (*c_handler)(struct papfile *, struct papfile *, struct sockaddr_at *);
18 int c_flags;
19};
20
21#define CH_DONE 0
22#define CH_MORE 1
23#define CH_ERROR -1
24
25 struct comstate {
26 struct papd_comment *cs_comment;
27 struct comstate *cs_prev;
28 int cs_flags;
29};
30
31 extern struct papd_comment *commatch(char *start, char *end,
32 struct papd_comment *table);
33 extern struct comstate *comstate;
34 extern struct papd_comment magics[];
35 extern struct papd_comment queries[];
36 extern struct papd_comment headers[];
37 extern char *comcont;
38
39#define compeek() (comstate==NULL?NULL:(comstate->cs_comment))
40#define comgetflags() (comstate->cs_flags)
41#define comsetflags(f) (comstate->cs_flags=(f))
42
43/*
44 * Comment flags. 0-15 reserved for "global" flags, 16-31 for specific
45 * subtypes.
46 */
47#define C_FULL (1<<0)
48#define C_CONTINUE (1<<1)
49
50/*
51 * Query subtypes.
52 */
53
54/*
55 * Magic "number" subtypes.
56 */
57#define CM_NOPRINT (1<<16)
58
59 void compop(void);
60 void compush(struct papd_comment *);
61 int comswitch(struct papd_comment *, int (*)(struct papfile *, struct papfile *,
62 struct sockaddr_at *));
63 int comcmp(char *, char *, char *, int);
64 struct papd_comment *commatch(char *, char *, struct papd_comment *);
65 char *comtoken(char *, char *, char *, char *);
66
67#endif /* PAPD_COMMENT_H */
comcont
char * comcont
Definition comment.c:21
headers
struct papd_comment headers[]
Definition headers.c:307
queries
struct papd_comment queries[]
Definition queries.c:797
compush
void compush(struct papd_comment *)
Definition comment.c:31
magics
struct papd_comment magics[]
Definition magics.c:269
comcmp
int comcmp(char *, char *, char *, int)
Definition comment.c:67
compop
void compop(void)
Definition comment.c:23
commatch
struct papd_comment * commatch(char *start, char *end, struct papd_comment *table)
comtoken
char * comtoken(char *, char *, char *, char *)
comswitch
int comswitch(struct papd_comment *, int(*)(struct papfile *, struct papfile *, struct sockaddr_at *))
table
#define table
Definition hash.c:41
comstate
Definition comment.h:25
comstate::cs_flags
int cs_flags
Definition comment.h:28
comstate::cs_prev
struct comstate * cs_prev
Definition comment.h:27
comstate::cs_comment
struct papd_comment * cs_comment
Definition comment.h:26
papd_comment
Definition comment.h:14
papd_comment::c_flags
int c_flags
Definition comment.h:18
papd_comment::c_begin
char * c_begin
Definition comment.h:15
papd_comment::c_end
char * c_end
Definition comment.h:16
papd_comment::c_handler
int(* c_handler)(struct papfile *, struct papfile *, struct sockaddr_at *)
Definition comment.h:17
papfile
Definition papd/file.h:11
sockaddr_at
Definition at.h:88