亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? distribute.c

?? linux 路由軟件 可支持RIP OSPF BGP等
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* Distribute list functions * Copyright (C) 1998, 1999 Kunihiro Ishiguro * * This file is part of GNU Zebra. * * GNU Zebra is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published * by the Free Software Foundation; either version 2, or (at your * option) any later version. * * GNU Zebra is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * 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. */#include <zebra.h>#include "hash.h"#include "if.h"#include "filter.h"#include "command.h"#include "distribute.h"#include "memory.h"/* Hash of distribute list. */struct hash *disthash;/* Hook functions. */void (*distribute_add_hook) (struct distribute *);void (*distribute_delete_hook) (struct distribute *);struct distribute *distribute_new (){  struct distribute *new;  new = XMALLOC (MTYPE_DISTRIBUTE, sizeof (struct distribute));  memset (new, 0, sizeof (struct distribute));  return new;}/* Free distribute object. */voiddistribute_free (struct distribute *dist){  if (dist->ifname)    free (dist->ifname);  if (dist->list[DISTRIBUTE_IN])    free (dist->list[DISTRIBUTE_IN]);  if (dist->list[DISTRIBUTE_OUT])    free (dist->list[DISTRIBUTE_OUT]);  if (dist->prefix[DISTRIBUTE_IN])    free (dist->prefix[DISTRIBUTE_IN]);  if (dist->prefix[DISTRIBUTE_OUT])    free (dist->prefix[DISTRIBUTE_OUT]);  XFREE (MTYPE_DISTRIBUTE, dist);}/* Lookup interface's distribute list. */struct distribute *distribute_lookup (char *ifname){  struct distribute key;  struct distribute *dist;  key.ifname = ifname;  dist = hash_lookup (disthash, &key);    return dist;}voiddistribute_list_add_hook (void (*func) (struct distribute *)){  distribute_add_hook = func;}voiddistribute_list_delete_hook (void (*func) (struct distribute *)){  distribute_delete_hook = func;}void *distribute_hash_alloc (struct distribute *arg){  struct distribute *dist;  dist = distribute_new ();  if (arg->ifname)    dist->ifname = strdup (arg->ifname);  else    dist->ifname = NULL;  return dist;}/* Make new distribute list and push into hash. */struct distribute *distribute_get (char *ifname){  struct distribute key;  key.ifname = ifname;  return hash_get (disthash, &key, distribute_hash_alloc);}unsigned intdistribute_hash_make (struct distribute *dist){  unsigned int key;  int i;  key = 0;  if (dist->ifname)    for (i = 0; i < strlen (dist->ifname); i++)      key += dist->ifname[i];  return key;}/* If two distribute-list have same value then return 1 else return   0. This function is used by hash package. */intdistribute_cmp (struct distribute *dist1, struct distribute *dist2){  if (dist1->ifname && dist2->ifname)    if (strcmp (dist1->ifname, dist2->ifname) == 0)      return 1;  if (! dist1->ifname && ! dist2->ifname)    return 1;  return 0;}/* Set access-list name to the distribute list. */struct distribute *distribute_list_set (char *ifname, enum distribute_type type, char *alist_name){  struct distribute *dist;  dist = distribute_get (ifname);  if (type == DISTRIBUTE_IN)    {      if (dist->list[DISTRIBUTE_IN])	free (dist->list[DISTRIBUTE_IN]);      dist->list[DISTRIBUTE_IN] = strdup (alist_name);    }  if (type == DISTRIBUTE_OUT)    {      if (dist->list[DISTRIBUTE_OUT])	free (dist->list[DISTRIBUTE_OUT]);      dist->list[DISTRIBUTE_OUT] = strdup (alist_name);    }  /* Apply this distribute-list to the interface. */  (*distribute_add_hook) (dist);    return dist;}/* Unset distribute-list.  If matched distribute-list exist then   return 1. */intdistribute_list_unset (char *ifname, enum distribute_type type, 		       char *alist_name){  struct distribute *dist;  dist = distribute_lookup (ifname);  if (!dist)    return 0;  if (type == DISTRIBUTE_IN)    {      if (!dist->list[DISTRIBUTE_IN])	return 0;      if (strcmp (dist->list[DISTRIBUTE_IN], alist_name) != 0)	return 0;      free (dist->list[DISTRIBUTE_IN]);      dist->list[DISTRIBUTE_IN] = NULL;          }  if (type == DISTRIBUTE_OUT)    {      if (!dist->list[DISTRIBUTE_OUT])	return 0;      if (strcmp (dist->list[DISTRIBUTE_OUT], alist_name) != 0)	return 0;      free (dist->list[DISTRIBUTE_OUT]);      dist->list[DISTRIBUTE_OUT] = NULL;          }  /* Apply this distribute-list to the interface. */  (*distribute_delete_hook) (dist);  /* If both out and in is NULL then free distribute list. */  if (dist->list[DISTRIBUTE_IN] == NULL &&      dist->list[DISTRIBUTE_OUT] == NULL &&      dist->prefix[DISTRIBUTE_IN] == NULL &&      dist->prefix[DISTRIBUTE_OUT] == NULL)    {      hash_release (disthash, dist);      distribute_free (dist);    }  return 1;}/* Set access-list name to the distribute list. */struct distribute *distribute_list_prefix_set (char *ifname, enum distribute_type type,			    char *plist_name){  struct distribute *dist;  dist = distribute_get (ifname);  if (type == DISTRIBUTE_IN)    {      if (dist->prefix[DISTRIBUTE_IN])	free (dist->prefix[DISTRIBUTE_IN]);      dist->prefix[DISTRIBUTE_IN] = strdup (plist_name);    }  if (type == DISTRIBUTE_OUT)    {      if (dist->prefix[DISTRIBUTE_OUT])	free (dist->prefix[DISTRIBUTE_OUT]);      dist->prefix[DISTRIBUTE_OUT] = strdup (plist_name);    }  /* Apply this distribute-list to the interface. */  (*distribute_add_hook) (dist);    return dist;}/* Unset distribute-list.  If matched distribute-list exist then   return 1. */intdistribute_list_prefix_unset (char *ifname, enum distribute_type type,			      char *plist_name){  struct distribute *dist;  dist = distribute_lookup (ifname);  if (!dist)    return 0;  if (type == DISTRIBUTE_IN)    {      if (!dist->prefix[DISTRIBUTE_IN])	return 0;      if (strcmp (dist->prefix[DISTRIBUTE_IN], plist_name) != 0)	return 0;      free (dist->prefix[DISTRIBUTE_IN]);      dist->prefix[DISTRIBUTE_IN] = NULL;          }  if (type == DISTRIBUTE_OUT)    {      if (!dist->prefix[DISTRIBUTE_OUT])	return 0;      if (strcmp (dist->prefix[DISTRIBUTE_OUT], plist_name) != 0)	return 0;      free (dist->prefix[DISTRIBUTE_OUT]);      dist->prefix[DISTRIBUTE_OUT] = NULL;          }  /* Apply this distribute-list to the interface. */  (*distribute_delete_hook) (dist);  /* If both out and in is NULL then free distribute list. */  if (dist->list[DISTRIBUTE_IN] == NULL &&      dist->list[DISTRIBUTE_OUT] == NULL &&      dist->prefix[DISTRIBUTE_IN] == NULL &&      dist->prefix[DISTRIBUTE_OUT] == NULL)    {      hash_release (disthash, dist);      distribute_free (dist);    }  return 1;}DEFUN (distribute_list_all,       distribute_list_all_cmd,       "distribute-list WORD (in|out)",       "Filter networks in routing updates\n"       "Access-list name\n"       "Filter incoming routing updates\n"       "Filter outgoing routing updates\n"){  enum distribute_type type;  struct distribute *dist;  /* Check of distribute list type. */  if (strncmp (argv[1], "i", 1) == 0)    type = DISTRIBUTE_IN;  else if (strncmp (argv[1], "o", 1) == 0)    type = DISTRIBUTE_OUT;  else    {      vty_out (vty, "distribute list direction must be [in|out]%s",	       VTY_NEWLINE);      return CMD_WARNING;    }  /* Get interface name corresponding distribute list. */  dist = distribute_list_set (NULL, type, argv[0]);  return CMD_SUCCESS;}ALIAS (distribute_list_all,       ipv6_distribute_list_all_cmd,       "distribute-list WORD (in|out)",       "Filter networks in routing updates\n"       "Access-list name\n"       "Filter incoming routing updates\n"       "Filter outgoing routing updates\n");DEFUN (no_distribute_list_all,       no_distribute_list_all_cmd,       "no distribute-list WORD (in|out)",       NO_STR       "Filter networks in routing updates\n"       "Access-list name\n"       "Filter incoming routing updates\n"       "Filter outgoing routing updates\n"){  int ret;  enum distribute_type type;  /* Check of distribute list type. */  if (strncmp (argv[1], "i", 1) == 0)    type = DISTRIBUTE_IN;  else if (strncmp (argv[1], "o", 1) == 0)    type = DISTRIBUTE_OUT;  else    {      vty_out (vty, "distribute list direction must be [in|out]%s",	       VTY_NEWLINE);      return CMD_WARNING;    }  ret = distribute_list_unset (NULL, type, argv[0]);  if (! ret)    {      vty_out (vty, "distribute list doesn't exist%s", VTY_NEWLINE);      return CMD_WARNING;    }  return CMD_SUCCESS;}ALIAS (no_distribute_list_all,       no_ipv6_distribute_list_all_cmd,       "no distribute-list WORD (in|out)",       NO_STR       "Filter networks in routing updates\n"       "Access-list name\n"       "Filter incoming routing updates\n"       "Filter outgoing routing updates\n");DEFUN (distribute_list,       distribute_list_cmd,       "distribute-list WORD (in|out) WORD",       "Filter networks in routing updates\n"       "Access-list name\n"       "Filter incoming routing updates\n"       "Filter outgoing routing updates\n"       "Interface name\n"){  enum distribute_type type;  struct distribute *dist;  /* Check of distribute list type. */  if (strncmp (argv[1], "i", 1) == 0)    type = DISTRIBUTE_IN;  else if (strncmp (argv[1], "o", 1) == 0)    type = DISTRIBUTE_OUT;  else    {      vty_out (vty, "distribute list direction must be [in|out]%s", VTY_NEWLINE);      return CMD_WARNING;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日日夜夜精品视频免费| 国产精品毛片久久久久久久| 三级不卡在线观看| 国产人伦精品一区二区| 久久精品国产99国产精品| 亚洲精品一区二区三区福利| 国产尤物一区二区| 中文字幕精品一区| 色综合视频在线观看| 亚洲韩国一区二区三区| 在线91免费看| 国产一区二区三区四| 国产精品久久久久毛片软件| 在线亚洲一区观看| 日韩激情中文字幕| 精品乱人伦小说| 成av人片一区二区| 亚洲一区二区三区影院| 日韩视频免费观看高清在线视频| 国产综合久久久久久久久久久久| 中文字幕精品在线不卡| 欧美日韩一区成人| 精品亚洲aⅴ乱码一区二区三区| 国产欧美一区二区在线观看| 91香蕉视频黄| 欧美96一区二区免费视频| 久久久精品tv| 欧美亚洲综合另类| 国产一区二三区| 亚洲免费观看高清完整版在线| 欧美日本一区二区三区| 国产伦精一区二区三区| 一区二区三区日韩欧美精品| 日韩欧美国产高清| 99久久精品一区二区| 偷拍自拍另类欧美| 国产精品久久久一本精品 | 日韩精品专区在线影院观看| 成人免费视频播放| 日韩高清国产一区在线| 国产精品国产三级国产有无不卡 | 麻豆精品国产传媒mv男同| 中文字幕精品综合| 欧美一级午夜免费电影| 色综合久久88色综合天天免费| 日韩高清在线一区| 亚洲欧洲国产日本综合| 欧美成人性福生活免费看| 91亚洲永久精品| 国产一区二区三区| 日韩电影在线观看电影| 中文字幕中文字幕一区二区| 日韩精品一区二区三区视频 | 免费在线观看不卡| 亚洲免费观看高清完整版在线观看熊 | 亚洲不卡av一区二区三区| 中文一区在线播放| 久久久久久久久久看片| 7777精品伊人久久久大香线蕉的| 波多野结衣中文字幕一区二区三区 | 99这里只有精品| 国产精品亚洲专一区二区三区| 日韩中文字幕区一区有砖一区 | 成人午夜激情视频| 精品一区二区三区在线观看国产| 亚洲午夜精品网| 一区二区三区国产| 亚洲激情欧美激情| 亚洲欧美综合在线精品| 中文字幕不卡在线观看| 国产亚洲一区二区三区四区| 久久久噜噜噜久久人人看 | 丁香激情综合五月| 国产成人免费av在线| 精品一区二区三区视频| 老汉av免费一区二区三区| 蜜臀久久99精品久久久久宅男| 日韩精品欧美精品| 日韩国产精品久久久久久亚洲| 午夜精品久久久久久久| 日韩电影在线观看一区| 日韩高清在线一区| 91福利小视频| 精品视频免费看| 欧美一区二区视频在线观看2020 | 97se狠狠狠综合亚洲狠狠| 成人国产精品视频| 99精品黄色片免费大全| 波多野结衣中文字幕一区| 成人av小说网| 一本色道a无线码一区v| 欧美日韩精品欧美日韩精品| 91精品国产综合久久国产大片 | 国产在线精品不卡| 国产精品综合在线视频| 不卡大黄网站免费看| 色网综合在线观看| 欧美精品一二三| 日韩美女一区二区三区四区| 久久久久97国产精华液好用吗| 久久久精品一品道一区| 亚洲天天做日日做天天谢日日欢| 一区二区三区四区视频精品免费| 亚洲成人自拍偷拍| 狠狠色狠狠色综合系列| 北岛玲一区二区三区四区| 在线观看视频欧美| 日韩欧美成人一区二区| 久久久一区二区| 亚洲精品成a人| 麻豆成人免费电影| 成人午夜视频在线观看| 91成人免费电影| 欧美丰满嫩嫩电影| 亚洲国产精品高清| 亚洲国产综合91精品麻豆| 青青草精品视频| 粉嫩av一区二区三区| 欧美精品第1页| 国产精品水嫩水嫩| 日本大胆欧美人术艺术动态 | 成人欧美一区二区三区1314| 亚洲国产综合人成综合网站| 狠狠色丁香婷婷综合久久片| 色婷婷综合在线| 久久亚洲一级片| 五月天激情综合网| 成人免费不卡视频| 欧美一区二区私人影院日本| 亚洲精品视频一区二区| 激情综合色综合久久综合| 欧美在线视频日韩| 国产精品美女久久久久久| 久久99久久久久久久久久久| 色综合激情久久| 日韩黄色在线观看| 美女精品一区二区| 国内成人免费视频| 色94色欧美sute亚洲13| 久久久精品综合| 日韩精品欧美精品| 久久久电影一区二区三区| 久久影院视频免费| 亚洲精品第1页| 美女视频黄a大片欧美| 欧美亚洲一区二区在线| 久久久影院官网| 五月天欧美精品| 国产成人综合网| 欧美久久婷婷综合色| 国产精品午夜电影| 免费高清不卡av| 7777精品久久久大香线蕉| 中文文精品字幕一区二区| 亚洲电影视频在线| 99re热这里只有精品免费视频| eeuss鲁一区二区三区| 中文字幕不卡在线播放| 六月婷婷色综合| 欧美视频日韩视频| 国产精品人妖ts系列视频| 国产99久久久国产精品潘金网站| 免费一区二区视频| 69堂精品视频| 午夜电影一区二区| 一区二区三区影院| 成人高清在线视频| 久久精品视频免费观看| 日韩成人免费看| 欧美日韩成人一区二区| 一区二区三区免费观看| 在线欧美日韩国产| 亚洲欧美怡红院| 99久久777色| 中文字幕精品一区| 91网上在线视频| 成人欧美一区二区三区1314| 成人激情小说乱人伦| 国产日韩欧美a| 99久久精品免费| 国产精品不卡一区| 91网站视频在线观看| 亚洲欧美日韩国产手机在线 | 国产精品一区二区在线观看不卡| 欧美一区二区三区在线| 五月天丁香久久| 欧美一区二区三区视频免费| 麻豆成人91精品二区三区| 91精品黄色片免费大全| 另类欧美日韩国产在线| 欧美日韩一区不卡| 久久精品国产第一区二区三区| 欧美一区二区国产| 久久福利视频一区二区| 国产精品不卡一区| 欧美亚洲国产一区二区三区va| 一区二区三区欧美日韩| 欧美日韩视频在线一区二区| 久久99国产乱子伦精品免费| 国产午夜亚洲精品午夜鲁丝片|