| 1 | /* |
| 2 | * Copyright (C) 2006-2012 B.A.T.M.A.N. contributors: |
| 3 | * |
| 4 | * Simon Wunderlich, Marek Lindner |
| 5 | * |
| 6 | * This program is free software; you can redistribute it and/or |
| 7 | * modify it under the terms of version 2 of the GNU General Public |
| 8 | * License as published by the Free Software Foundation. |
| 9 | * |
| 10 | * This program is distributed in the hope that it will be useful, but |
| 11 | * WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
| 13 | * General Public License for more details. |
| 14 | * |
| 15 | * You should have received a copy of the GNU General Public License |
| 16 | * along with this program; if not, write to the Free Software |
| 17 | * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
| 18 | * 02110-1301, USA |
| 19 | * |
| 20 | */ |
| 21 | |
| 22 | #ifndef _BATMAND_HNA_H |
| 23 | #define _BATMAND_HNA_Hcxx . . $ `hna.h:23:9`! |
| 24 | |
| 25 | #include <stdint.h> |
| 26 | #include "list-batman.h"cxx . . $ `<file>/list-batman.h`/ |
| 27 | #include "batman.h"cxx . . $ `<file>/batman.h`/ |
| 28 | |
| 29 | |
| 30 | extern unsigned char *hna_buff_localcxx . . $ hna_buff_local.; |
| 31 | extern uint8_tcxx . . $ uint8_t# num_hna_localcxx . . $ num_hna_local.; |
| 32 | |
| 33 | /* we print the announced hna over the unix socket */ |
| 34 | extern struct list_head_firstcxx . . $ list_head_first# hna_listcxx . . $ hna_list.; |
| 35 | /* batman client needs to feed that into the unix socket */ |
| 36 | extern struct list_head_firstcxx . . $ list_head_first# hna_chg_listcxx . . $ hna_chg_list.; |
| 37 | |
| 38 | |
| 39 | struct hna_elementcxx . . $ hna_element# |
| 40 | { |
| 41 | uint32_tcxx . . $ uint32_t# addrcxx . . $ hna_element#addr.; |
| 42 | uint8_tcxx . . $ uint8_t# netmaskcxx . . $ hna_element#netmask.; |
| 43 | } __attribute__((packed)); |
| 44 | |
| 45 | struct hna_taskcxx . . $ hna_task# |
| 46 | { |
| 47 | struct list_headcxx . . $ list_head# listcxx . . $ hna_task#list.; |
| 48 | uint32_tcxx . . $ uint32_t# addrcxx . . $ hna_task#addr.; |
| 49 | uint8_tcxx . . $ uint8_t# netmaskcxx . . $ hna_task#netmask.; |
| 50 | uint8_tcxx . . $ uint8_t# route_actioncxx . . $ hna_task#route_action.; |
| 51 | }; |
| 52 | |
| 53 | struct hna_local_entrycxx . . $ hna_local_entry# |
| 54 | { |
| 55 | struct list_headcxx . . $ list_head# listcxx . . $ hna_local_entry#list.; |
| 56 | uint32_tcxx . . $ uint32_t# addrcxx . . $ hna_local_entry#addr.; |
| 57 | uint8_tcxx . . $ uint8_t# netmaskcxx . . $ hna_local_entry#netmask.; |
| 58 | }; |
| 59 | |
| 60 | struct hna_global_entrycxx . . $ hna_global_entry# |
| 61 | { |
| 62 | uint32_tcxx . . $ uint32_t# addrcxx . . $ hna_global_entry#addr.; |
| 63 | uint8_tcxx . . $ uint8_t# netmaskcxx . . $ hna_global_entry#netmask.; |
| 64 | struct orig_nodecxx . . $ orig_node# *curr_orig_nodecxx . . $ hna_global_entry#curr_orig_node. ALIGN_POINTERcxx . . $ `batman.h:138:9`!; |
| 65 | struct list_head_firstcxx . . $ list_head_first# orig_listcxx . . $ hna_global_entry#orig_list. ALIGN_POINTERcxx . . $ `batman.h:138:9`!; |
| 66 | } __attribute__((packed)); |
| 67 | |
| 68 | struct hna_orig_ptrcxx . . $ hna_orig_ptr# |
| 69 | { |
| 70 | struct list_headcxx . . $ list_head# listcxx . . $ hna_orig_ptr#list.; |
| 71 | struct orig_nodecxx . . $ orig_node# *orig_nodecxx . . $ hna_orig_ptr#orig_node.; |
| 72 | }; |
| 73 | |
| 74 | void hna_initcxx . . $ hna_init(49f6e7a06ebc5aa8).(void); |
| 75 | void hna_freecxx . . $ hna_free(49f6e7a06ebc5aa8).(void); |
| 76 | void hna_local_task_add_ipcxx . . $ hna_local_task_add_ip(7a04fae65666aa2e).(uint32_tcxx . . $ uint32_t# ip_addr, uint16_tcxx . . $ uint16_t# netmask, uint8_tcxx . . $ uint8_t# route_action); |
| 77 | void hna_local_task_add_strcxx . . $ hna_local_task_add_str(8a75a5628e33726e).(char *hna_string, uint8_tcxx . . $ uint8_t# route_action, uint8_tcxx . . $ uint8_t# runtime); |
| 78 | void hna_local_task_execcxx . . $ hna_local_task_exec(49f6e7a06ebc5aa8).(void); |
| 79 | |
| 80 | unsigned char *hna_local_update_vis_packetcxx . . $ hna_local_update_vis_packet(435453bff7033622).(unsigned char *vis_packet, uint16_tcxx . . $ uint16_t# *vis_packet_size); |
| 81 | void hna_local_update_routescxx . . $ hna_local_update_routes(6bedf363600d6173).(struct hna_local_entrycxx . . $ hna_local_entry# *hna_local_entry, int8_tcxx . . $ int8_t# route_action); |
| 82 | |
| 83 | void hna_global_addcxx . . $ hna_global_add(3ad1559f03b6ef9c).(struct orig_nodecxx . . $ orig_node# *orig_node, unsigned char *new_hna, int16_tcxx . . $ int16_t# new_hna_len); |
| 84 | void hna_global_updatecxx . . $ hna_global_update(249f4eadfbbd8035).(struct orig_nodecxx . . $ orig_node# *orig_node, unsigned char *new_hna, |
| 85 | int16_tcxx . . $ int16_t# new_hna_len, struct neigh_nodecxx . . $ neigh_node# *old_router); |
| 86 | void hna_global_check_tqcxx . . $ hna_global_check_tq(6ec1dc9fd6f4d477).(struct orig_nodecxx . . $ orig_node# *orig_node); |
| 87 | void hna_global_delcxx . . $ hna_global_del(6ec1dc9fd6f4d477).(struct orig_nodecxx . . $ orig_node# *orig_node); |
| 88 | |
| 89 | #endif |