~ubuntu-branches/ubuntu/precise/netatalk/precise

« back to all changes in this revision

Viewing changes to etc/afpd/fork.h

  • Committer: Bazaar Package Importer
  • Author(s): Sebastian Rittau
  • Date: 2004-01-19 12:43:49 UTC
  • Revision ID: james.westby@ubuntu.com-20040119124349-es563jbp0hk0ae51
Tags: upstream-1.6.4
ImportĀ upstreamĀ versionĀ 1.6.4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * $Id: fork.h,v 1.5 2002/09/05 14:52:07 didg Exp $
 
3
 *
 
4
 * Copyright (c) 1990,1993 Regents of The University of Michigan.
 
5
 * All Rights Reserved.  See COPYRIGHT.
 
6
 */
 
7
 
 
8
#ifndef AFPD_FORK_H
 
9
#define AFPD_FORK_H 1
 
10
 
 
11
#include <stdio.h>
 
12
#include <sys/cdefs.h>
 
13
 
 
14
#include <netatalk/endian.h>
 
15
#include <atalk/adouble.h>
 
16
#include "volume.h"
 
17
#include "directory.h"
 
18
 
 
19
struct file_key {
 
20
    dev_t               dev;
 
21
    ino_t               inode;
 
22
};
 
23
 
 
24
struct ofork {
 
25
    struct adouble      *of_ad;
 
26
    struct vol          *of_vol;
 
27
    struct dir          *of_dir;
 
28
    char                *of_name;
 
29
    int                 of_namelen;
 
30
 
 
31
    u_int16_t           of_refnum;
 
32
    int                 of_flags;
 
33
 
 
34
    struct file_key     key;
 
35
    struct ofork        **prevp, *next;
 
36
    struct ofork        *of_d_prev, *of_d_next;
 
37
};
 
38
 
 
39
#define OPENFORK_DATA   (0)
 
40
#define OPENFORK_RSCS   (1<<7)
 
41
 
 
42
#define OPENACC_RD      (1<<0)
 
43
#define OPENACC_WR      (1<<1)
 
44
#define OPENACC_DRD     (1<<4)
 
45
#define OPENACC_DWR     (1<<5)
 
46
 
 
47
#define AFPFORK_OPEN    (1<<0)
 
48
#define AFPFORK_RSRC    (1<<1)
 
49
#define AFPFORK_DATA    (1<<2)
 
50
#define AFPFORK_DIRTY   (1<<3)
 
51
#define AFPFORK_ACCRD   (1<<4)
 
52
#define AFPFORK_ACCWR   (1<<5)
 
53
#define AFPFORK_ACCMASK (AFPFORK_ACCRD | AFPFORK_ACCWR)
 
54
 
 
55
/* in ofork.c */
 
56
extern struct ofork *of_alloc    __P((struct vol *, struct dir *,
 
57
                                                      char *, u_int16_t *, const int,
 
58
                                                      struct adouble *,
 
59
                                                      struct stat *));
 
60
extern void         of_dealloc   __P((struct ofork *));
 
61
extern struct ofork *of_find     __P((const u_int16_t));
 
62
extern struct ofork *of_findname __P((const char *, struct stat *));
 
63
extern int          of_rename    __P((const struct vol *,
 
64
                                          struct ofork *,
 
65
                                          struct dir *, const char *,
 
66
                                          struct dir *, const char *));
 
67
extern int          of_flush     __P((const struct vol *));
 
68
extern void         of_pforkdesc __P((FILE *));
 
69
 
 
70
/* in fork.c */
 
71
extern int          flushfork    __P((struct ofork *));
 
72
 
 
73
/* FP functions */
 
74
extern int      afp_openfork __P((AFPObj *, char *, int, char *, int *));
 
75
extern int      afp_bytelock __P((AFPObj *, char *, int, char *, int *));
 
76
extern int      afp_getforkparams __P((AFPObj *, char *, int, char *, int *));
 
77
extern int      afp_setforkparams __P((AFPObj *, char *, int, char *, int *));
 
78
extern int      afp_read __P((AFPObj *, char *, int, char *, int *));
 
79
extern int      afp_write __P((AFPObj *, char *, int, char *, int *));
 
80
extern int      afp_flushfork __P((AFPObj *, char *, int, char *, int *));
 
81
extern int      afp_flush __P((AFPObj *, char *, int, char *, int *));
 
82
extern int      afp_closefork __P((AFPObj *, char *, int, char *, int *));
 
83
 
 
84
#endif