mirror of https://framagit.org/bortzmeyer/echoping
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
25 lines
717 B
Plaintext
25 lines
717 B
Plaintext
20 years ago
|
If you want to write your own plugins, they will have to provide three
|
||
|
functions:
|
||
|
|
||
|
char * init (const int argc, const char **argv)
|
||
|
Accepts remaining arguments (you have to use popt to parse them, or
|
||
|
do it by hand, getopt does not allow you to resume the parsing) and
|
||
|
returns a string identifying the port name. If it makes no sens, you
|
||
|
can safely return NULL.
|
||
|
|
||
|
void start (struct addrinfo *res)
|
||
|
Typically just stores the res structure for later use.
|
||
|
|
||
|
void execute ()
|
||
|
Connects and do whatever the protocol requires.
|
||
|
|
||
|
Start your plugin source code with:
|
||
|
|
||
|
#define IN_PLUGIN
|
||
|
#include "../echoping.h"
|
||
|
|
||
|
You can look at random.c, the simplest plugin, and whois.c, the
|
||
|
simplest which still does something useful.
|
||
|
|
||
|
$Id$
|