1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/lib/mdns/src/mdns.h Thu Mar 26 01:25:34 2009 +0100
1.3 @@ -0,0 +1,79 @@
1.4 +/*
1.5 +OLSR MDNS plugin.
1.6 +Written by Saverio Proto <zioproto@gmail.com> and Claudio Pisa <clauz@ninux.org>.
1.7 +
1.8 + This file is part of OLSR MDNS PLUGIN.
1.9 +
1.10 + The OLSR MDNS PLUGIN is free software: you can redistribute it and/or modify
1.11 + it under the terms of the GNU General Public License as published by
1.12 + the Free Software Foundation, either version 3 of the License, or
1.13 + (at your option) any later version.
1.14 +
1.15 + The OLSR MDNS PLUGIN is distributed in the hope that it will be useful,
1.16 + but WITHOUT ANY WARRANTY; without even the implied warranty of
1.17 + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1.18 + GNU General Public License for more details.
1.19 +
1.20 + You should have received a copy of the GNU General Public License
1.21 + along with Foobar. If not, see <http://www.gnu.org/licenses/>.
1.22 +
1.23 +
1.24 + */
1.25 +
1.26 +
1.27 +#ifndef _MDNS_MDNS_H
1.28 +#define _MDNS_MDNS_H
1.29 +
1.30 +
1.31 +#include "plugin.h" /* union set_plugin_parameter_addon */
1.32 +
1.33 +#include "parser.h"
1.34 +
1.35 +#define MESSAGE_TYPE 132
1.36 +#define PARSER_TYPE MESSAGE_TYPE
1.37 +#define EMISSION_INTERVAL 10 /* seconds */
1.38 +#define EMISSION_JITTER 25 /* percent */
1.39 +#define MDNS_VALID_TIME 1800 /* seconds */
1.40 +
1.41 +/* BMF plugin data */
1.42 +#define PLUGIN_NAME "OLSRD MDNS plugin"
1.43 +#define PLUGIN_NAME_SHORT "OLSRD MDNS"
1.44 +#define PLUGIN_VERSION "1.0.0 (" __DATE__ " " __TIME__ ")"
1.45 +#define PLUGIN_COPYRIGHT " (C) Ninux.org"
1.46 +#define PLUGIN_AUTHOR " Saverio Proto (zioproto@gmail.com)"
1.47 +#define MOD_DESC PLUGIN_NAME " " PLUGIN_VERSION "\n" PLUGIN_COPYRIGHT "\n" PLUGIN_AUTHOR
1.48 +#define PLUGIN_INTERFACE_VERSION 5
1.49 +
1.50 +/* UDP-Port on which multicast packets are encapsulated */
1.51 +//#define BMF_ENCAP_PORT 50698
1.52 +
1.53 +/* Forward declaration of OLSR interface type */
1.54 +struct interface;
1.55 +
1.56 +//extern int FanOutLimit;
1.57 +//extern int BroadcastRetransmitCount;
1.58 +
1.59 +void DoMDNS(int sd, void * x, unsigned int y);
1.60 +void BmfPError(const char* format, ...) __attribute__((format(printf, 1, 2)));
1.61 +union olsr_ip_addr* MainAddressOf(union olsr_ip_addr* ip);
1.62 +//int InterfaceChange(struct interface* interf, int action);
1.63 +//int SetFanOutLimit(const char* value, void* data, set_plugin_parameter_addon addon);
1.64 +//int InitBmf(struct interface* skipThisIntf);
1.65 +//void CloseBmf(void);
1.66 +int InitMDNS(struct interface* skipThisIntf);
1.67 +void CloseMDNS(void);
1.68 +
1.69 +void olsr_mdns_gen(unsigned char* packet, int len);
1.70 +
1.71 +/* Parser function to register with the scheduler */
1.72 +bool
1.73 +olsr_parser(union olsr_message *, struct interface *, union olsr_ip_addr *);
1.74 +
1.75 +#endif /* _MDNS_MDNS_H */
1.76 +
1.77 +/*
1.78 + * Local Variables:
1.79 + * c-basic-offset: 2
1.80 + * indent-tabs-mode: nil
1.81 + * End:
1.82 + */