OpenCores
URL https://opencores.org/ocsvn/or1k_old/or1k_old/trunk

Subversion Repositories or1k_old

[/] [or1k_old/] [trunk/] [rc203soc/] [sw/] [uClinux/] [include/] [linux/] [ncp_fs_sb.h] - Blame information for rev 1765

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1633 jcastillo
/*
2
 *  ncp_fs_sb.h
3
 *
4
 *  Copyright (C) 1995, 1996 by Volker Lendecke
5
 *
6
 */
7
 
8
#ifndef _NCP_FS_SB
9
#define _NCP_FS_SB
10
 
11
#include <linux/ncp_mount.h>
12
#include <linux/types.h>
13
 
14
#ifdef __KERNEL__
15
 
16
#define NCP_DEFAULT_BUFSIZE 1024
17
#define NCP_DEFAULT_OPTIONS 0           /* 2 for packet signatures */
18
 
19
struct ncp_server {
20
 
21
        struct ncp_mount_data m; /* Nearly all of the mount data is of
22
                                    interest for us later, so we store
23
                                    it completely. */
24
 
25
        __u8 name_space[NCP_NUMBER_OF_VOLUMES];
26
 
27
        struct file *ncp_filp;  /* File pointer to ncp socket */
28
        struct file *wdog_filp; /* File pointer to wdog socket */
29
        struct file *msg_filp;  /* File pointer to message socket */
30
        void *data_ready;       /* The wdog socket gets a new
31
                                   data_ready callback. We store the
32
                                   old one for checking purposes and
33
                                   to reset it on unmounting. */
34
 
35
        u8         sequence;
36
        u8         task;
37
        u16        connection;  /* Remote connection number */
38
 
39
        u8         completion;  /* Status message from server */
40
        u8         conn_status; /* Bit 4 = 1 ==> Server going down, no
41
                                   requests allowed anymore.
42
                                   Bit 0 = 1 ==> Server is down. */
43
 
44
        int        buffer_size; /* Negotiated bufsize */
45
 
46
        int        reply_size;  /* Size of last reply */
47
 
48
        int        packet_size;
49
        unsigned char *packet;  /* Here we prepare requests and
50
                                   receive replies */
51
 
52
        int        lock;        /* To prevent mismatch in protocols. */
53
        struct wait_queue *wait;
54
 
55
        int        current_size; /* for packet preparation */
56
        int        has_subfunction;
57
        int        ncp_reply_size;
58
 
59
        struct ncp_inode_info root;
60
        char       root_path;   /* '\0' */
61
 
62
/* info for packet signing */
63
        int sign_wanted;        /* 1=Server needs signed packets */
64
        int sign_active;        /* 0=don't do signing, 1=do */
65
        char sign_root[8];      /* generated from password and encr. key */
66
        char sign_last[16];
67
};
68
 
69
static inline int
70
ncp_conn_valid(struct ncp_server *server)
71
{
72
        return ((server->conn_status & 0x11) == 0);
73
}
74
 
75
static inline void
76
ncp_invalidate_conn(struct ncp_server *server)
77
{
78
        server->conn_status |= 0x01;
79
}
80
 
81
#endif /* __KERNEL__ */
82
 
83
#endif

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.