⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 static_routes.tp

📁 xorp源码hg
💻 TP
📖 第 1 页 / 共 3 页
字号:
/* $XORP: xorp/etc/templates/static_routes.tp,v 1.41 2007/01/23 01:57:36 pavlin Exp $ */protocols {    static {	targetname:		txt = "static_routes";	disable:		toggle = false;	enabled:		bool;		/* %deprecated */	route @: ipv4net {	    next-hop:		ipv4;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	    qualified-next-hop @: ipv4 {		metric:		u32 = 10;	    }	}	route @: ipv6net {	    next-hop:		ipv6;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	    qualified-next-hop @: ipv6 {		metric:		u32 = 10;	    }	}	route4 @: ipv4net {			/* %deprecated */	    next-hop:		ipv4;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	}	route6 @: ipv6net {			/* %deprecated */	    next-hop:		ipv6;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	}	interface-route @: ipv4net {	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv4 = 0.0.0.0;	    metric:		u32 = 1;	    qualified-next-hop-interface @: txt {		qualified-next-hop-vif @: txt {		    next-hop-router:	ipv4 = 0.0.0.0;		    metric:		u32 = 10;		}	    }	}	interface-route @: ipv6net {	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv6 = ::;	    metric:		u32 = 1;	    qualified-next-hop-interface @: txt {		qualified-next-hop-vif @: txt {		    next-hop-router:	ipv6 = ::;		    metric:		u32 = 10;		}	    }	}	interface-route4 @: ipv4net {		/* %deprecated */	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv4 = 0.0.0.0;	    metric:		u32 = 1;	}	interface-route6 @: ipv6net {		/* %deprecated */	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv6 = ::;	    metric:		u32 = 1;	}	mrib-route @: ipv4net {	    next-hop:		ipv4;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	    qualified-next-hop @: ipv4 {		metric:		u32 = 10;	    }	}	mrib-route @: ipv6net {	    next-hop:		ipv6;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	    qualified-next-hop @: ipv6 {		metric:		u32 = 10;	    }	}	mrib-route4 @: ipv4net {		/* %deprecated */	    next-hop:		ipv4;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	}	mrib-route6 @: ipv6net {		/* %deprecated */	    next-hop:		ipv6;	    nexthop:		ipv4;		/* %deprecated */	    metric:		u32 = 1;	}	mrib-interface-route @: ipv4net {	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv4 = 0.0.0.0;	    metric:		u32 = 1;	    qualified-next-hop-interface @: txt {		qualified-next-hop-vif @: txt {		    next-hop-router:	ipv4 = 0.0.0.0;		    metric:		u32 = 10;		}	    }	}	mrib-interface-route @: ipv6net {	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv6 = ::;	    metric:		u32 = 1;	    qualified-next-hop-interface @: txt {		qualified-next-hop-vif @: txt {		    next-hop-router:	ipv6 = ::;		    metric:		u32 = 10;		}	    }	}	mrib-interface-route4 @: ipv4net {	/* %deprecated */	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv4 = 0.0.0.0;	    metric:		u32 = 1;	}	mrib-interface-route6 @: ipv6net {	/* %deprecated */	    next-hop-interface: txt;	    next-hop-vif:	txt;	    next-hop-router:	ipv6 = ::;	    metric:		u32 = 1;	}	import: txt;    }}policy {    policy-statement @: txt {	term @: txt {	    from {		nexthop4: ipv4range;		nexthop6: ipv6range;		metric: u32range;	    }	}    }}protocols {    static {	%help:		short	"Configure static routes";	%modinfo:	provides	static_routes;	%modinfo:	depends		rib;	%modinfo:	depends		policy;	%modinfo:	path		"static_routes/xorp_static_routes";	%modinfo:	default_targetname "static_routes";	%modinfo:	status_method	xrl "$(static.targetname)/common/0.1/get_status->status:u32&reason:txt";	%modinfo:	shutdown_method	xrl "$(static.targetname)/common/0.1/shutdown";	%mandatory:	$(@.targetname);	%activate:	xrl "$(static.targetname)/static_routes/0.1/start_static_routes";	targetname {	    %user-hidden: "XRL target name";	    %help:	short "XRL target name";	    %set:;	}	disable {	    %help:	short "Disable the static routes";	    %create:;	    %set:	xrl "$(static.targetname)/static_routes/0.1/enable_static_routes?enable:bool=`~$(@)`";	    %delete:	xrl "$(static.targetname)/static_routes/0.1/enable_static_routes?enable:bool=`~$(DEFAULT)`";	}	enabled {	    %deprecated: "Statement 'enabled: true/false' is replaced with 'disable: false/true'";	    %help:	short "Enable the static routes";	    %create:;	    %set:	xrl "$(static.targetname)/static_routes/0.1/enable_static_routes?enable:bool=$(@)";	}	route @: ipv4net {	    %help:	short "Configure a static route";	    %mandatory:	$(@.next-hop);	    %create:	xrl "$(static.targetname)/static_routes/0.1/add_route4?unicast:bool=true&multicast:bool=false&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop)&metric:u32=$(@.metric)";	    %update:	xrl "$(static.targetname)/static_routes/0.1/replace_route4?unicast:bool=true&multicast:bool=false&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop)&metric:u32=$(@.metric)";	    %delete:	xrl "$(static.targetname)/static_routes/0.1/delete_route4?unicast:bool=true&multicast:bool=false&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop)";	    next-hop {		%help:	short "Configure the next-hop router";		%set:;	    }	    nexthop {		%deprecated: "Statement 'nexthop' is replaced with 'next-hop'";		%help:	short "Configure the next-hop router";		%set:;	    }	    metric {		%help:	short "Configure the routing metric";		%allow-range: $(@) "1" "65535" %help: "The routing metric";		%set:;	    }	    qualified-next-hop @: ipv4 {		%help:		short "Next hop with qualifiers";		%create:	xrl "$(static.targetname)/static_routes/0.1/add_backup_route4?unicast:bool=true&multicast:bool=false&network:ipv4net=$(route.@)&nexthop:ipv4=$(@)&metric:u32=$(@.metric)";		%update:	xrl "$(static.targetname)/static_routes/0.1/replace_backup_route4?unicast:bool=true&multicast:bool=false&network:ipv4net=$(route.@)&nexthop:ipv4=$(@)&metric:u32=$(@.metric)";		%delete:	xrl "$(static.targetname)/static_routes/0.1/delete_backup_route4?unicast:bool=true&multicast:bool=false&network:ipv4net=$(route.@)&nexthop:ipv4=$(@)";		metric {		    %help:	short "Configure the routing metric";		    %allow-range: $(@) "1" "65535" %help: "The routing metric";		    %set:;		}	    }	}	route @: ipv6net {	    %help:	short "Configure a static route";	    %mandatory:	$(@.next-hop);	    %create: xrl "$(static.targetname)/static_routes/0.1/add_route6?unicast:bool=true&multicast:bool=false&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop)&metric:u32=$(@.metric)";	    %update: xrl "$(static.targetname)/static_routes/0.1/replace_route6?unicast:bool=true&multicast:bool=false&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop)&metric:u32=$(@.metric)";	    %delete: xrl "$(static.targetname)/static_routes/0.1/delete_route6?unicast:bool=true&multicast:bool=false&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop)";	    next-hop {		%help:	short "Configure the next-hop router";		%set:;	    }	    nexthop {		%deprecated: "Statement 'nexthop' is replaced with 'next-hop'";		%help:	short "Configure the next-hop router";		%set:;	    }	    metric {		%help:	short "Configure the routing metric";		%allow-range: $(@) "1" "65535" %help: "The routing metric";		%set:;	    }	    qualified-next-hop @: ipv6 {		%help:		short "Next hop with qualifiers";		%create:	xrl "$(static.targetname)/static_routes/0.1/add_backup_route6?unicast:bool=true&multicast:bool=false&network:ipv6net=$(route.@)&nexthop:ipv6=$(@)&metric:u32=$(@.metric)";		%update:	xrl "$(static.targetname)/static_routes/0.1/replace_backup_route6?unicast:bool=true&multicast:bool=false&network:ipv6net=$(route.@)&nexthop:ipv6=$(@)&metric:u32=$(@.metric)";		%delete:	xrl "$(static.targetname)/static_routes/0.1/delete_backup_route6?unicast:bool=true&multicast:bool=false&network:ipv6net=$(route.@)&nexthop:ipv6=$(@)";		metric {		    %help:	short "Configure the routing metric";		    %allow-range: $(@) "1" "65535" %help: "The routing metric";		    %set:;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -