forked from mirrors/tftp-hpa-google

This adds an "E" flag to the rewrite rules, which exits rule processing if and only if the result is a valid, accessible filename. If combined with "r", the rewrite is cancelled if the rule is not applied. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
35 lines
998 B
C
35 lines
998 B
C
/* ----------------------------------------------------------------------- *
|
|
*
|
|
* Copyright 2001 H. Peter Anvin - All Rights Reserved
|
|
*
|
|
* This program is free software available under the same license
|
|
* as the "OpenBSD" operating system, distributed at
|
|
* http://www.openbsd.org/.
|
|
*
|
|
* ----------------------------------------------------------------------- */
|
|
|
|
/*
|
|
* tftpd.h
|
|
*
|
|
* Prototypes for various functions that are part of the tftpd server.
|
|
*/
|
|
|
|
#ifndef TFTPD_TFTPD_H
|
|
#define TFTPD_TFTPD_H
|
|
|
|
void set_signal(int, void (*)(int), int);
|
|
void *tfmalloc(size_t);
|
|
char *tfstrdup(const char *);
|
|
|
|
extern int verbosity;
|
|
|
|
struct formats {
|
|
const char *f_mode;
|
|
char *(*f_rewrite) (const struct formats *, char *, int, int, const char **);
|
|
int (*f_validate) (char *, int, const struct formats *, const char **);
|
|
void (*f_send) (const struct formats *, struct tftphdr *, int);
|
|
void (*f_recv) (const struct formats *, struct tftphdr *, int);
|
|
int f_convert;
|
|
};
|
|
|
|
#endif
|