]>
git.proxmox.com Git - mirror_frr.git/blob - pimd/pim_oil.h
c63c026c0f29b5f967c91eba2eb02f6c257aa742
3 Copyright (C) 2008 Everton da Silva Marques
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
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.
15 You should have received a copy of the GNU General Public License
16 along with this program; see the file COPYING; if not, write to the
17 Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
20 $QuaggaId: $Format:%an, %ai, %h$ $
26 #include "pim_mroute.h"
29 * Where did we get this (S,G) from?
31 * IGMP - Learned from IGMP
32 * PIM - Learned from PIM
33 * SOURCE - Learned from Source multicast packet received
35 #define PIM_OIF_FLAG_PROTO_IGMP (1 << 0)
36 #define PIM_OIF_FLAG_PROTO_PIM (1 << 1)
37 #define PIM_OIF_FLAG_PROTO_SOURCE (2 << 1)
38 #define PIM_OIF_FLAG_PROTO_ANY (PIM_OIF_FLAG_PROTO_IGMP | \
39 PIM_OIF_FLAG_PROTO_PIM | \
40 PIM_OIF_FLAG_PROTO_SOURCE)
43 * We need a pimreg vif id from the kernel.
44 * Since ifindex == vif id for most cases and the number
45 * of expected interfaces is at most 100, using MAXVIFS -1
47 * Don't come running to me if this assumption is bad,
50 #define PIM_OIF_PIM_REGISTER_VIF (MAXVIFS - 1)
51 #define PIM_MAX_USABLE_VIFS (MAXVIFS - 2)
57 unsigned long oldpktcnt
;
58 unsigned long bytecnt
;
59 unsigned long oldbytecnt
;
60 unsigned long wrong_if
;
61 unsigned long oldwrong_if
;
65 qpim_channel_oil_list holds a list of struct channel_oil.
67 Each channel_oil.oil is used to control an (S,G) entry in the Kernel
68 Multicast Forwarding Cache.
76 time_t oif_creation
[MAXVIFS
];
77 uint32_t oif_flags
[MAXVIFS
];
78 struct channel_counts cc
;
81 void pim_channel_oil_free(struct channel_oil
*c_oil
);
82 struct channel_oil
*pim_channel_oil_add(struct in_addr group_addr
,
83 struct in_addr source_addr
,
85 void pim_channel_oil_del(struct channel_oil
*c_oil
);
87 int pim_channel_add_oif(struct channel_oil
*c_oil
,
88 struct interface
*oif
,
91 #endif /* PIM_OIL_H */