Protocols now load data into a buffer; they don't execute it.

This commit is contained in:
Michael Brown
2005-05-09 14:27:29 +00:00
parent 116f17f605
commit 0fe74493f4
6 changed files with 37 additions and 50 deletions

View File

@@ -2,18 +2,14 @@
#define PROTO_H
#include "tables.h"
#include "buffer.h"
#include "in.h"
struct protocol {
char *name;
in_port_t default_port;
int ( * load ) ( char *url,
struct sockaddr_in *server,
char *file,
int ( * process ) ( unsigned char *data,
unsigned int blocknum,
unsigned int len,
int eof ) );
int ( * load ) ( char *url, struct sockaddr_in *server, char *file,
struct buffer *buffer );
};
/*