File: at_var.h

package info (click to toggle)
netatalk 2.0.3-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 9,004 kB
  • ctags: 6,109
  • sloc: ansic: 67,633; sh: 8,424; perl: 1,187; makefile: 1,001
file content (58 lines) | stat: -rw-r--r-- 1,412 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 * $Id: at_var.h,v 1.2 2001/06/29 14:14:47 rufustfirefly Exp $
 *
 * Copyright (c) 1990,1991 Regents of The University of Michigan.
 *
 * All Rights Reserved.  See COPYRIGHT.
 */

#ifndef _ATVAR_H
#define _ATVAR_H 1

/*
 * For phase2, we need to keep not only our address on an interface,
 * but also the legal networks on the interface.
 */
struct at_ifaddr {
    struct ifaddr	aa_ifa;
# define aa_ifp			aa_ifa.ifa_ifp
#ifdef BSD4_4
    struct sockaddr_at	aa_addr;
    struct sockaddr_at	aa_broadaddr;
    struct sockaddr_at	aa_netmask;
#else /* BSD4_4 */
# define aa_addr		aa_ifa.ifa_addr
# define aa_broadaddr		aa_ifa.ifa_broadaddr
# define aa_dstaddr		aa_ifa.ifa_dstaddr
#endif /* BSD4_4 */
    int			aa_flags;
    u_short		aa_firstnet, aa_lastnet;
    int			aa_probcnt;
    struct at_ifaddr	*aa_next;
};

#ifdef BSD4_4
struct at_aliasreq {
	char	ifra_name[IFNAMSIZ];		/* if name, e.g. "en0" */
	struct	sockaddr_at ifra_addr;
	struct	sockaddr_at ifra_broadaddr;
#define ifra_dstaddr ifra_broadaddr
	struct	sockaddr_at ifra_mask;
};
#endif /* BSD4_4 */

#define AA_SAT(aa) \
    ((struct sockaddr_at *)&((struct at_ifaddr *)(aa))->aa_addr)
#define satosat(sa)	((struct sockaddr_at *)(sa))

#define AFA_ROUTE	0x0001
#define AFA_PROBING	0x0002
#define AFA_PHASE2	0x0004

#ifdef KERNEL
struct at_ifaddr	*at_ifaddr;
struct ifqueue		atintrq1, atintrq2;
int			atdebug;
#endif /* KERNEL */

#endif /* _ATVAR_H */