1 /* $NetBSD: ldp.h,v 1.3 2011/06/16 14:48:30 kefren Exp $ */ 2 3 /*- 4 * Copyright (c) 2010 The NetBSD Foundation, Inc. 5 * All rights reserved. 6 * 7 * This code is derived from software contributed to The NetBSD Foundation 8 * by Mihai Chelaru <kefren@NetBSD.org> 9 * 10 * Redistribution and use in source and binary forms, with or without 11 * modification, are permitted provided that the following conditions 12 * are met: 13 * 1. Redistributions of source code must retain the above copyright 14 * notice, this list of conditions and the following disclaimer. 15 * 2. Redistributions in binary form must reproduce the above copyright 16 * notice, this list of conditions and the following disclaimer in the 17 * documentation and/or other materials provided with the distribution. 18 * 19 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 20 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 21 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 22 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 23 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 24 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 25 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 26 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 27 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 28 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 29 * POSSIBILITY OF SUCH DAMAGE. 30 */ 31 32 #ifndef _LDP_H_ 33 #define _LDP_H_ 34 35 #include <sys/types.h> 36 #include <netinet/in.h> 37 38 #define ALL_ROUTERS "224.0.0.2" 39 #define LDP_PORT 646 40 #define LDP_COMMAND_PORT 2626 41 42 #define LDPD_VER "0.3.0" 43 44 #define CONFFILE "/etc/ldpd.conf" 45 46 extern char my_ldp_id[20]; 47 48 #define LDP_ID my_ldp_id 49 50 /* LDP Messages */ 51 #define LDP_NOTIFICATION 0x0001 52 #define LDP_HELLO 0x0100 53 #define LDP_INITIALIZE 0x0200 54 #define LDP_KEEPALIVE 0x0201 55 #define LDP_ADDRESS 0x0300 56 #define LDP_ADDRESS_WITHDRAW 0x0301 57 #define LDP_LABEL_MAPPING 0x0400 58 #define LDP_LABEL_REQUEST 0x0401 59 #define LDP_LABEL_WITHDRAW 0x0402 60 #define LDP_LABEL_RELEASE 0x0403 61 #define LDP_LABEL_ABORT 0x0404 62 63 /* Protocol version */ 64 #define LDP_VERSION 1 65 66 /* Various timers */ 67 #define LDP_HELLO_TIME 5 68 #define LDP_HELLO_KEEP 15 69 #define LDP_THELLO_KEEP 45 70 #define LDP_KEEPALIVE_TIME 4 71 #define LDP_HOLDTIME 15 72 73 #define MIN_LABEL 16 74 #define MAX_LABEL 1048576 75 76 #define ROUTE_LOOKUP_LOOP 6 77 #define REPLAY_MAX 100 78 #define MAX_POLL_FDS 200 79 80 void print_usage(char*); 81 82 #endif /* !_LDP_H_ */ 83