]> git.proxmox.com Git - mirror_frr.git/blobdiff - ospf6d/ospf6_proto.h
Merge pull request #2946 from mjstapp/dplane_2
[mirror_frr.git] / ospf6d / ospf6_proto.h
index 6e6e988e62a5fb60dac24432424a2b10ae91ba2c..c9e7b549db8b4443cb99f86fb33c87b41ff11f44 100644 (file)
  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
  * General Public License for more details.
  *
- * You should have received a copy of the GNU General Public License
- * along with GNU Zebra; see the file COPYING.  If not, write to the
- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
- * Boston, MA 02111-1307, USA.
+ * You should have received a copy of the GNU General Public License along
+ * with this program; see the file COPYING; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
 #ifndef OSPF6_PROTO_H
 /* OSPF6 Prefix */
 #define OSPF6_PREFIX_MIN_SIZE                  4U /* .length == 0 */
 struct ospf6_prefix {
-       u_int8_t prefix_length;
-       u_int8_t prefix_options;
+       uint8_t prefix_length;
+       uint8_t prefix_options;
        union {
-               u_int16_t _prefix_metric;
-               u_int16_t _prefix_referenced_lstype;
+               uint16_t _prefix_metric;
+               uint16_t _prefix_referenced_lstype;
        } u;
 #define prefix_metric        u._prefix_metric
 #define prefix_refer_lstype  u._prefix_referenced_lstype
        /* followed by one address_prefix */
+       struct in6_addr addr[];
 };
 
 #define OSPF6_PREFIX_OPTION_NU (1 << 0)  /* No Unicast */
@@ -84,17 +84,12 @@ struct ospf6_prefix {
 #define OSPF6_PREFIX_NEXT(x)                                                   \
        ((struct ospf6_prefix *)((caddr_t)(x) + OSPF6_PREFIX_SIZE(x)))
 
-#define ospf6_prefix_in6_addr(in6, op)                                         \
-       do {                                                                   \
-               memset(in6, 0, sizeof(struct in6_addr));                       \
-               memcpy(in6, (caddr_t)(op) + sizeof(struct ospf6_prefix),       \
-                      OSPF6_PREFIX_SPACE((op)->prefix_length));               \
-       } while (0)
-
+extern void ospf6_prefix_in6_addr(struct in6_addr *in6, const void *prefix_buf,
+                                 const struct ospf6_prefix *p);
 extern void ospf6_prefix_apply_mask(struct ospf6_prefix *op);
-extern void ospf6_prefix_options_printbuf(u_int8_t prefix_options, char *buf,
+extern void ospf6_prefix_options_printbuf(uint8_t prefix_options, char *buf,
                                          int size);
 extern void ospf6_capability_printbuf(char capability, char *buf, int size);
-extern void ospf6_options_printbuf(u_char *options, char *buf, int size);
+extern void ospf6_options_printbuf(uint8_t *options, char *buf, int size);
 
 #endif /* OSPF6_PROTO_H */