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

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

?? distribute.c

?? 大名鼎鼎的路由器源碼。程序分ZEBRA、OSPFRIP等3個包。程序框架采用一個路由協議一個進程的方式
?? 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一区二区三区免费野_久草精品视频
制服丝袜在线91| 欧美极品美女视频| 欧美亚洲动漫精品| 在线视频国内一区二区| 成人高清免费在线播放| 国产精品1区2区| 国产福利一区在线观看| 国产激情一区二区三区四区| 国模冰冰炮一区二区| 国产麻豆午夜三级精品| 国产精品一区二区在线观看不卡| 激情五月播播久久久精品| 国产一区二区三区四 | 99久久er热在这里只有精品15| 国产成人夜色高潮福利影视| 国产精品一二三四| 不卡视频一二三| 欧美性生活久久| 日韩女优av电影| 国产视频一区二区三区在线观看| 欧美激情一二三区| 亚洲欧洲美洲综合色网| 又紧又大又爽精品一区二区| 亚洲高清三级视频| 久久精品二区亚洲w码| 国产乱色国产精品免费视频| www欧美成人18+| 国产精品天美传媒沈樵| 亚洲免费视频成人| 免费人成在线不卡| 成人综合婷婷国产精品久久蜜臀| 97国产一区二区| 欧美福利视频导航| 国产欧美日韩亚州综合| 日韩毛片精品高清免费| 午夜精品久久久久久久蜜桃app| 免费在线观看不卡| bt欧美亚洲午夜电影天堂| 色婷婷狠狠综合| 日韩欧美的一区| 日韩理论片中文av| 奇米影视一区二区三区| 国产精品456| 欧美乱妇20p| 国产亚洲欧美日韩在线一区| 樱桃视频在线观看一区| 美日韩一区二区三区| av在线免费不卡| 欧美一卡2卡三卡4卡5免费| 国产喷白浆一区二区三区| 夜夜操天天操亚洲| 国产美女精品人人做人人爽| 欧美伊人久久久久久久久影院| 日韩精品一区二区三区四区| 亚洲欧美日本在线| 激情亚洲综合在线| 欧美日韩精品久久久| 国产欧美va欧美不卡在线| 亚洲永久免费av| 国产91色综合久久免费分享| 欧美精品三级日韩久久| 日韩一区欧美小说| 九色综合国产一区二区三区| 91国产成人在线| 亚洲国产精品成人综合| 免费成人av在线| 欧美中文字幕一二三区视频| 国产日韩精品一区二区三区在线| 性做久久久久久免费观看| 成人激情小说网站| 欧美va日韩va| 日韩高清不卡一区二区| 91视频免费观看| 国产日产欧美一区二区三区| 欧美日韩一区小说| 国产精品网站一区| 国产乱子伦一区二区三区国色天香| 欧美日韩精品电影| 亚洲精品免费在线| www.66久久| 国产日韩欧美精品综合| 国产资源在线一区| 欧美一区二区三区白人| 亚洲午夜电影在线| 日本久久一区二区| 亚洲精品国产视频| 97久久久精品综合88久久| 国产视频一区不卡| 国产精品123区| 久久精品这里都是精品| 美日韩一区二区| 欧美一级黄色大片| 日本女人一区二区三区| 69堂精品视频| 日韩va亚洲va欧美va久久| 欧美乱妇15p| 日韩精品一级二级| 91.com在线观看| 午夜国产不卡在线观看视频| 欧美亚洲综合色| 亚洲一区二区三区精品在线| 色综合天天性综合| 亚洲精品国产a| 在线视频欧美区| 亚洲成人第一页| 日韩一区二区免费电影| 久久成人18免费观看| 欧美变态口味重另类| 国产在线一区观看| 国产视频一区在线播放| 成人午夜大片免费观看| 亚洲色欲色欲www在线观看| 日本精品一区二区三区高清| 亚洲最大的成人av| 欧美精品123区| 蜜乳av一区二区| 26uuu成人网一区二区三区| 国产精品538一区二区在线| 国产精品九色蝌蚪自拍| 在线亚洲+欧美+日本专区| 亚洲成av人片观看| 日韩欧美成人激情| 成人教育av在线| 亚洲在线中文字幕| 日韩一级免费观看| 国产成人精品免费一区二区| 国产精品乱码人人做人人爱| 91丨九色丨国产丨porny| 亚洲一区电影777| 精品国产髙清在线看国产毛片| 国产尤物一区二区| 1024国产精品| 欧美日韩成人一区二区| 激情综合色综合久久| 国产精品伦理一区二区| 欧美日韩精品一区二区在线播放 | 懂色av一区二区三区免费看| 国产精品久久久久久久久免费桃花| 91欧美一区二区| 日韩av电影天堂| 成人免费不卡视频| 亚洲成人动漫在线观看| 久久久九九九九| 欧美性受xxxx黑人xyx| 极品少妇xxxx偷拍精品少妇| 中文一区在线播放| 欧美乱妇一区二区三区不卡视频 | 欧美精品一区二区久久婷婷 | 日韩欧美一区二区在线视频| 国产精品一区久久久久| 亚洲一区二区三区四区不卡| 欧美www视频| 在线亚洲免费视频| 国内精品在线播放| 亚洲最新在线观看| 国产调教视频一区| 欧美精品色综合| 99在线精品免费| 麻豆国产欧美日韩综合精品二区 | 亚洲国产日韩一级| 久久伊人中文字幕| 欧美亚洲国产一区二区三区va| 国内欧美视频一区二区| 亚洲国产一区视频| 日本一区二区三区高清不卡| 欧美老年两性高潮| 成a人片国产精品| 国内精品国产成人国产三级粉色| 亚洲精品高清在线| 亚洲国产精品二十页| 日韩色视频在线观看| 在线精品视频免费播放| 国产成人亚洲综合a∨猫咪| 男男视频亚洲欧美| 一区二区三区免费观看| 欧美国产激情二区三区| 日韩精品综合一本久道在线视频| 欧美性猛交xxxx乱大交退制版 | 久久综合久久99| 欧美精品xxxxbbbb| 91久久香蕉国产日韩欧美9色| 高清视频一区二区| 国产麻豆欧美日韩一区| 琪琪一区二区三区| 日韩精品一卡二卡三卡四卡无卡| 亚洲黄色性网站| 亚洲伦理在线免费看| 中文乱码免费一区二区| 久久久国产午夜精品 | 久久99精品网久久| 丝袜美腿亚洲色图| 亚洲成人三级小说| 亚洲永久精品大片| 一级精品视频在线观看宜春院| 国产精品丝袜久久久久久app| www国产亚洲精品久久麻豆| 日韩精品一区二| 欧美大片顶级少妇| 日韩美女一区二区三区| 日韩欧美在线综合网|