3 Written by Saverio Proto <zioproto@gmail.com> and Claudio Pisa <clauz@ninux.org>.
5 This file is part of OLSR MDNS PLUGIN.
7 The OLSR MDNS PLUGIN is free software: you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation, either version 3 of the License, or
10 (at your option) any later version.
12 The OLSR MDNS PLUGIN is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with Foobar. If not, see <http://www.gnu.org/licenses/>.
28 #include "plugin.h" /* union set_plugin_parameter_addon */
32 #define MESSAGE_TYPE 132
33 #define PARSER_TYPE MESSAGE_TYPE
34 #define EMISSION_INTERVAL 10 /* seconds */
35 #define EMISSION_JITTER 25 /* percent */
36 #define MDNS_VALID_TIME 1800 /* seconds */
39 #define PLUGIN_NAME "OLSRD MDNS plugin"
40 #define PLUGIN_NAME_SHORT "OLSRD MDNS"
41 #define PLUGIN_VERSION "1.0.0 (" __DATE__ " " __TIME__ ")"
42 #define PLUGIN_COPYRIGHT " (C) Ninux.org"
43 #define PLUGIN_AUTHOR " Saverio Proto (zioproto@gmail.com)"
44 #define MOD_DESC PLUGIN_NAME " " PLUGIN_VERSION "\n" PLUGIN_COPYRIGHT "\n" PLUGIN_AUTHOR
45 #define PLUGIN_INTERFACE_VERSION 5
47 /* UDP-Port on which multicast packets are encapsulated */
48 //#define BMF_ENCAP_PORT 50698
50 /* Forward declaration of OLSR interface type */
53 //extern int FanOutLimit;
54 //extern int BroadcastRetransmitCount;
56 void DoMDNS(int sd, void * x, unsigned int y);
57 void BmfPError(const char* format, ...) __attribute__((format(printf, 1, 2)));
58 union olsr_ip_addr* MainAddressOf(union olsr_ip_addr* ip);
59 //int InterfaceChange(struct interface* interf, int action);
60 //int SetFanOutLimit(const char* value, void* data, set_plugin_parameter_addon addon);
61 //int InitBmf(struct interface* skipThisIntf);
62 //void CloseBmf(void);
63 int InitMDNS(struct interface* skipThisIntf);
66 void olsr_mdns_gen(unsigned char* packet, int len);
68 /* Parser function to register with the scheduler */
70 olsr_parser(union olsr_message *, struct interface *, union olsr_ip_addr *);
72 #endif /* _MDNS_MDNS_H */
77 * indent-tabs-mode: nil