|
|
DataMuseum.dkPresents historical artifacts from the history of: DKUUG/EUUG Conference tapes |
This is an automatic "excavation" of a thematic subset of
See our Wiki for more about DKUUG/EUUG Conference tapes Excavated with: AutoArchaeologist - Free & Open Source Software. |
top - metrics - downloadIndex: T a
Length: 5726 (0x165e)
Types: TextFile
Names: »addr.h«
└─⟦9ae75bfbd⟧ Bits:30007242 EUUGD3: Starter Kit
└─⟦2fafebccf⟧ »EurOpenD3/mail/smail3.1.19.tar.Z«
└─⟦bcd2bc73f⟧
└─⟦this⟧ »src/addr.h«
/* @(#)addr.h 3.13 2/4/89 15:16:00 */
/*
* Copyright (C) 1987, 1988 Ronald S. Karr and Landon Curt Noll
*
* See the file COPYING, distributed with smail, for restriction
* and warranty information.
*/
/*
* addr.h:
* interface file for routines in addr.c
*/
/* types used in addr.h */
/*
* addr - Everything needed to understand an address is stored in
* here somewhere.
*/
struct addr {
struct addr *succ; /* next addr in queue */
long flags; /* miscellaneous flags */
struct addr *parent; /* addr from which this one is derived */
struct addr *true_addr; /* point to addr which had an error */
char *in_addr; /* address from header or args */
char *target; /* next explicit destination */
char *remainder; /* address beyond explicit site */
char *work_addr; /* working area */
int match_count; /* chars of target matched by router */
char *route; /* the route to the target */
struct router *router; /* router used for route and next_host */
struct director *director; /* director which matched address */
char *next_host; /* next-hop host to receive message */
char *next_addr; /* address to give next-hop host */
struct transport *transport; /* transport to use for remote delivery */
char *home; /* home directory associated with login */
int uid; /* user for pipes/files perms or BOGUS_USER */
int gid; /* gid for pipes/files perms or BOGUS_GROUP */
struct error *error; /* error message associated */
};
/* structure for errors stored in the addr structure */
struct error {
long info; /* info associated with error */
char *message; /* error message */
};
/*
* The identify_addr structure is used to uniquely identify specific addr
* structures produced by resolve_addr_list(). The in_addr value in an
* addr structure is insufficient, by itself, to identify an addr structure,
* when that structure is a file or pipe form address. It is, however,
* sufficient to give the parent address as well, if one exists.
*/
struct identify_addr {
struct identify_addr *succ; /* this will be a linked list */
char *address; /* the address of interest */
char *parent; /* the parent of that address */
};
/*
* The defer_addr structure is used to form a list of previously defer'd
* addresses. This list is formed from the per-message logfile data, and
* is used to filter out redundant deferal messages.
*/
struct defer_addr {
struct defer_addr *succ; /* this will be a linked list */
long error; /* error number */
char *message; /* deferal message */
char *address; /* address defered */
char *parent; /* parent of defered address */
};
/*
* bits used in addr.flag
*/
#define ADDR_CAUTION 0x00000010 /* be cautious of this address */
#define ADDR_UNSECURE 0x00000200 /* address from an unsecure source */
#define ADDR_PUTDOT 0x00000400 /* dot removed from end of target */
#define ADDR_MOVEDOT 0x00000800 /* end dot moved to front of target */
#define ADDR_ERROR 0x00001000 /* error in resolving address */
#define ADDR_FINISHED 0x00002000 /* address fully resolved */
#define ADDR_FULLMATCH 0x00004000 /* router fully matched target */
#define ADDR_DONTHASH 0x00008000 /* addr states should not be hashed */
#define ADDR_SMARTUSER 0x00010000 /* smart user director already used */
#define ADDR_SMARTHOST 0x00020000 /* smart host router already used */
#define ADDR_NOTUSER 0x00040000 /* address is not a local user */
#define ADDR_ISUSER 0x00080000 /* address is a local user */
#define ADDR_FWDTYPE 0x00100000 /* director used was forwarding type */
#define ADDR_ALIASTYPE 0x00200000 /* director used was aliasing type */
#define ADDR_LISTTYPE 0x00400000 /* director was mailinglist type */
#define ADDR_SHADOW 0x00800000 /* using shadow transport */
#define ADDR_PARTLOCAL 0x01000000 /* partially matched local host */
#define ADDR_FORM_MASK 0x0000000f /* form from parse_address */
/*
* NOTE:
* Routers can set ADDR_SMARTHOST if the smarthost router should
* not be used. For example, if the local host is a gateway for
* a domain and a hostname within that domain cannot be resolved,
* then the router can set ADDR_SMARTHOST to prevent an incorrect
* usage of the smarthost router.
* Directors can set ADDR_SMARTUSER in a similar manner if this
* ever proves useful.
*
* The ADDR_PARTLOCAL should also be set for partial matches to the local
* host. If ADDR_PARTLOCAL is set for an address and ADDR_FULLMATCH
* is not set, the target is not considered to be resolved.
*/
/* bits stored in error.info */
#define ERR_MASK 0x0000ffffL /* mask for the error number */
#define ERR_NSENDER 0x00010000L /* notify sender of message */
#define ERR_NPOSTMAST 0x00020000L /* notify postmaster */
#define ERR_NSOWNER 0x00040000L /* notify address owner or sender */
#define ERR_NPOWNER 0x00080000L /* notify owner or postmaster */
#define ERR_CONFERR 0x00100000L /* configuration error encountered */
/*
* user and group ids are preset to BOGUS_USER and BOGUS_GROUP in order
* to prevent them from being mistaken for root and wheel
*/
#define BOGUS_USER (-1) /* not a valid user id */
#define BOGUS_GROUP (-1) /* not a valid group id */
/* return values from parse_address */
#define PARSE_ERROR 0 /* error in parsing */
#define RFC_ROUTE 1 /* route part of a route-addr */
#define RFC_ENDROUTE 2 /* last component of a route */
#define MAILBOX 3 /* standard user@foo mailbox */
#define UUCP_ROUTE 4 /* uucp !-route */
#define PCT_MAILBOX 5 /* non-standard user%foo mailbox */
#define LOCAL 6 /* local address */
#define BERKENET 7 /* berkenet host:user form */
#define DECNET 8 /* decnet host::user form */