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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? fttag.c

?? netflow,抓包
?? C
?? 第 1 頁 / 共 3 頁
字號:
  /* add a new entry to the list */  if (!(ftdta = (struct fttag_def_term_actions*)malloc(sizeof *ftdta))) {    fterr_warn("malloc()");    return -1;  }  bzero(ftdta, sizeof *ftdta);  ftdta->name = c;  FT_STAILQ_INSERT_TAIL(&lp->cur_def_term->actions, ftdta, chain);  /* resolve the ftdta->action later in resolve_actions */  return 0;} /* parse_def_action *//* * function: resolve_actions * * The parser points to the name of the action in the definition to allow * for definitions to be defined before actions in the config file.  This * fixes the pointers so the definitions point to the actions * * returns: 0  ok *          <0 fail (an action could not be resolved) */int resolve_actions(struct fttag *fttag){  struct fttag_def *ftd;  struct fttag_def_term *ftdt;  struct fttag_def_term_actions *ftdta;  struct fttag_action *fta;  int i, found;  /* foreach definition */  FT_SLIST_FOREACH(ftd, &fttag->defs, chain) {    /* foreach term in the definition */    FT_STAILQ_FOREACH(ftdt, &ftd->terms, chain) {      /*       * pre-init filter to all 1's to minimize test in eval later       */      if (!(ftdt->flags & FT_TAG_DEF_FILTER_INPUT))        for (i = 0; i < 65536; ++i)          ftdt->in_tbl[i] = 1;      if (!(ftdt->flags & FT_TAG_DEF_FILTER_OUTPUT))        for (i = 0; i < 65536; ++i)          ftdt->out_tbl[i] = 1;      /* foreach action in the term */      FT_STAILQ_FOREACH(ftdta, &ftdt->actions, chain) {        found = 0;        /* foreach action */        FT_SLIST_FOREACH(fta, &fttag->actions, chain) {          if (!(strcasecmp(fta->name, ftdta->name))) {            ftdta->action = fta;            found = 1;            break;          }        }      }      if (!found) {        fterr_warnx("Unable to resolve action \"%s\" in tag-definition \"%s\".", ftdta->name, ftd->name);        return -1;      }    }  }  return 0;} /* resolve actions *//* * function: fttag_free * * free resources allocated by fttag_load() * */void fttag_free(struct fttag *fttag){  struct fttag_action *fta;  struct fttag_def *ftd;  struct fttag_def_term *ftdt;  struct fttag_def_term_actions *ftdta;  /* foreach action, remove the action and associated storge */  while (!FT_SLIST_EMPTY(&fttag->actions)) {    fta = FT_SLIST_FIRST(&fttag->actions);    FT_SLIST_REMOVE_HEAD(&fttag->actions, chain);    if (fta->type & FT_TAG_TYPE_MATCH_AS)      free(fta->look);    else if (fta->type & FT_TAG_TYPE_MATCH_NEXTHOP)      ftchash_free(fta->look);    else if (fta->type & FT_TAG_TYPE_MATCH_PREFIX) {      rhead = fta->look;      rhead->rnh_walktree(rhead, walk_free, 0);    }    free(fta->name);    free(fta);  } /* while */  /* foreach definition, remove the definition and associated storage */  while (!FT_SLIST_EMPTY(&fttag->defs)) {    ftd = FT_SLIST_FIRST(&fttag->defs);    FT_SLIST_REMOVE_HEAD(&fttag->defs, chain);    /* foreach term in the definition */    while (!FT_STAILQ_EMPTY(&ftd->terms)) {      ftdt = FT_STAILQ_FIRST(&ftd->terms);      while (!FT_STAILQ_EMPTY(&ftdt->actions)) {        ftdta = FT_STAILQ_FIRST(&ftdt->actions);        FT_STAILQ_REMOVE_HEAD(&ftdt->actions, chain);        free(ftdta);      }      FT_STAILQ_REMOVE_HEAD(&ftd->terms, chain);      free (ftdt);    }    free(ftd->name);    free(ftd);  } /* while */} /* fttag_free *//* * function: fttag_def_eval * * perform tag actions on a flow * * run down each term in the definition *  evaluate the filter, if okay *    run every action * * the filter is activated by *  FT_TAG_DEF_FILTER_INPUT - check input *  FT_TAG_DEF_FILTER_OUTPUT check output *  FT_TAG_DEF_FILTER_EXPORTER check exporter * * * returns 0 */inline int fttag_def_eval(struct fttag_def *ftd,  struct fts3rec_v1005 *rec){  struct fttag_def_term *ftdt;  struct fttag_def_term_actions *ftdta;  struct fttag_action *fta;  /* foreach term in the definition */  FT_STAILQ_FOREACH(ftdt, &ftd->terms, chain) {    /* in_tbl is preloaded with "permit any" so don't check the flags bit */    if (!ftdt->in_tbl[rec->input])      continue;    /* out_tbl is preloaded with "permit any" so don't check the flags bit */    if (!ftdt->out_tbl[rec->output])      continue;    if (ftdt->flags & FT_TAG_DEF_FILTER_EXPORTER)      if (ftdt->exporter_ip != rec->exaddr)        continue;    /* for every action chained to this term */    FT_STAILQ_FOREACH(ftdta, &ftdt->actions, chain) {        /* the action */      fta = ftdta->action;        /* based on the type do the action if a match is made */      fta->eval(fta, rec);    } /* foreach action references by the term */  } /* foreach term */    return 0;} /* fttag_def_eval */inline void eval_match_src_as(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_as_look *as_look;  u_int16 set_tmp;   as_look = fta->look;   set_tmp = as_look->set_flags_lookup[rec->src_as];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = as_look->dst_tag_lookup[rec->src_as];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= as_look->dst_tag_lookup[rec->src_as];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = as_look->src_tag_lookup[rec->src_as];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= as_look->src_tag_lookup[rec->src_as];} /* eval_match_src_as */inline void eval_match_dst_as(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_as_look *as_look;  u_int16 set_tmp;   as_look = fta->look;   set_tmp = as_look->set_flags_lookup[rec->dst_as];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = as_look->dst_tag_lookup[rec->dst_as];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= as_look->dst_tag_lookup[rec->dst_as];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = as_look->src_tag_lookup[rec->dst_as];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= as_look->src_tag_lookup[rec->dst_as];} /* eval_match_dst_as */inline void eval_match_src_prefix(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct radix_sockaddr_in dst_sock;  struct fttag_prefix_look *prefix_look;  struct radix_node_head *rhead;  u_int16 set_tmp;  rhead = fta->look;  dst_sock.sin_addr.s_addr = rec->srcaddr;  dst_sock.sin_len = sizeof (struct radix_sockaddr_in);  dst_sock.sin_family = AF_INET;  prefix_look = (struct fttag_prefix_look *)    rhead->rnh_matchaddr(&dst_sock, rhead);  if (prefix_look) {    set_tmp = prefix_look->set_flags;    if (set_tmp & FT_TAG_SET_DST_TAG)      rec->dst_tag = prefix_look->dst_tag;    else if (set_tmp & FT_TAG_OR_DST_TAG)      rec->dst_tag |= prefix_look->dst_tag;    if (set_tmp & FT_TAG_SET_SRC_TAG)      rec->src_tag = prefix_look->src_tag;    else if (set_tmp & FT_TAG_OR_SRC_TAG)     rec->src_tag |= prefix_look->src_tag;  }} /* eval_match_src_prefix */inline void eval_match_dst_prefix(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct radix_sockaddr_in dst_sock;  struct fttag_prefix_look *prefix_look;  struct radix_node_head *rhead;  u_int16 set_tmp;  rhead = fta->look;  dst_sock.sin_addr.s_addr = rec->dstaddr;  dst_sock.sin_len = sizeof (struct radix_sockaddr_in);  dst_sock.sin_family = AF_INET;  prefix_look = (struct fttag_prefix_look *)    rhead->rnh_matchaddr(&dst_sock, rhead);  if (prefix_look) {    set_tmp = prefix_look->set_flags;    if (set_tmp & FT_TAG_SET_DST_TAG)      rec->dst_tag = prefix_look->dst_tag;    else if (set_tmp & FT_TAG_OR_DST_TAG)      rec->dst_tag |= prefix_look->dst_tag;    if (set_tmp & FT_TAG_SET_SRC_TAG)      rec->src_tag = prefix_look->src_tag;    else if (set_tmp & FT_TAG_OR_SRC_TAG)     rec->src_tag |= prefix_look->src_tag;  }} /* eval_match_dst_prefix */inline void eval_match_nexthop(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct ftchash *ftch;  u_int32 hash, ipaddr;  struct fttag_next_hop_look *nh_look;  u_int16 set_tmp;  ftch = fta->look;  ipaddr = rec->nexthop;  hash = (ipaddr>>16) ^ (ipaddr & 0xFFFF);  hash = (hash>>8) ^ (hash & 0xFF);  /* lookup next hop */  nh_look = ftchash_lookup(ftch, &ipaddr, hash);  if (nh_look) {    set_tmp = nh_look->set_flags;    if (set_tmp & FT_TAG_SET_DST_TAG)      rec->dst_tag = nh_look->dst_tag;    else if (set_tmp & FT_TAG_OR_DST_TAG)      rec->dst_tag |= nh_look->dst_tag;     if (set_tmp & FT_TAG_SET_SRC_TAG)      rec->src_tag = nh_look->src_tag;    else if (set_tmp & FT_TAG_OR_SRC_TAG)      rec->src_tag |= nh_look->src_tag;     }} /* eval_match_nexthop */inline void eval_match_prefix(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  eval_match_src_prefix(fta, rec);  eval_match_dst_prefix(fta, rec);} /* eval_match_prefix */inline void eval_match_as(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  eval_match_src_as(fta, rec);  eval_match_dst_as(fta, rec);} /* eval_match_as */inline void eval_match_tcp_src_port(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_port_look *port_look;  u_int16 set_tmp;   port_look = fta->look;  /* only TCP here */  if (rec->prot != 6)    return;   set_tmp = port_look->set_flags_lookup[rec->srcport];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = port_look->dst_tag_lookup[rec->srcport];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= port_look->dst_tag_lookup[rec->srcport];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = port_look->src_tag_lookup[rec->srcport];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= port_look->src_tag_lookup[rec->srcport];} /* eval_match_tcp_src_port */inline void eval_match_tcp_dst_port(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_port_look *port_look;  u_int16 set_tmp;   port_look = fta->look;  /* only TCP here */  if (rec->prot != 6)    return;   set_tmp = port_look->set_flags_lookup[rec->dstport];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = port_look->dst_tag_lookup[rec->dstport];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= port_look->dst_tag_lookup[rec->dstport];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = port_look->src_tag_lookup[rec->dstport];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= port_look->src_tag_lookup[rec->dstport];} /* eval_match_tcp_dst_port */inline void eval_match_udp_src_port(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_port_look *port_look;  u_int16 set_tmp;   port_look = fta->look;  /* only UDP here */  if (rec->prot != 17)    return;   set_tmp = port_look->set_flags_lookup[rec->srcport];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = port_look->dst_tag_lookup[rec->srcport];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= port_look->dst_tag_lookup[rec->srcport];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = port_look->src_tag_lookup[rec->srcport];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= port_look->src_tag_lookup[rec->srcport];} /* eval_match_udp_src_port */inline void eval_match_udp_dst_port(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_port_look *port_look;  u_int16 set_tmp;   port_look = fta->look;  /* only UDP here */  if (rec->prot != 17)    return;   set_tmp = port_look->set_flags_lookup[rec->dstport];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = port_look->dst_tag_lookup[rec->dstport];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= port_look->dst_tag_lookup[rec->dstport];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = port_look->src_tag_lookup[rec->dstport];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= port_look->src_tag_lookup[rec->dstport];} /* eval_match_udp_dst_port */inline void eval_match_tcp_port(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  eval_match_tcp_src_port(fta, rec);  eval_match_tcp_dst_port(fta, rec);} /* eval_match_tcp_port */inline void eval_match_udp_port(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  eval_match_udp_src_port(fta, rec);  eval_match_udp_dst_port(fta, rec);} /* eval_match_udp_port */inline void eval_match_tos(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_tos_look *tos_look;  u_int16 set_tmp;   tos_look = fta->look;  set_tmp = tos_look->set_flags_lookup[rec->tos];   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = tos_look->dst_tag_lookup[rec->tos];  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= tos_look->dst_tag_lookup[rec->tos];   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = tos_look->src_tag_lookup[rec->tos];  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= tos_look->src_tag_lookup[rec->tos];} /* eval_match_tos */inline void eval_match_any(struct fttag_action *fta,  struct fts3rec_v1005 *rec){  struct fttag_any_look *any_look;  u_int16 set_tmp;   any_look = fta->look;  set_tmp = any_look->set_flags;   if (set_tmp & FT_TAG_SET_DST_TAG)    rec->dst_tag = any_look->dst_tag;  else if (set_tmp & FT_TAG_OR_DST_TAG)    rec->dst_tag |= any_look->dst_tag;   if (set_tmp & FT_TAG_SET_SRC_TAG)    rec->src_tag = any_look->src_tag;  if (set_tmp & FT_TAG_OR_SRC_TAG)    rec->src_tag |= any_look->src_tag;} /* eval_match_any */static int walk_free(struct radix_node *rn, struct walkarg *UNUSED){  struct fttag_prefix_look *r;  struct radix_sockaddr_in sock1, sock2;  r = (struct  fttag_prefix_look*)rn;  bzero(&sock1, sizeof sock1);  bzero(&sock2, sizeof sock2);  sock1.sin_addr.s_addr = r->addr.sin_addr.s_addr;  sock1.sin_len = sizeof sock1;  sock1.sin_family = AF_INET;  sock2.sin_addr.s_addr = (!r->masklen) ? 0: mask_lookup[r->masklen];  sock2.sin_len = sizeof sock2;  sock2.sin_family = AF_INET;  if (r != (struct fttag_prefix_look*)rhead->rnh_deladdr(&sock1,    &sock2, rhead))    fterr_errx(1, "rn_deladdr(): failed.");  else    free(r);  return 0;} /* walk_free */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩成人一级大片| 欧美一区二区三区成人| 亚州成人在线电影| 91久久线看在观草草青青| 国产精品久久看| 色狠狠一区二区三区香蕉| 亚洲高清三级视频| 日韩一区二区不卡| 东方aⅴ免费观看久久av| 中文字幕一区视频| 欧美日韩在线亚洲一区蜜芽| 美女视频一区二区三区| 久久久青草青青国产亚洲免观| 国产原创一区二区| 中文字幕日韩一区| 欧美日韩成人高清| 韩国精品在线观看| 亚洲视频一区二区在线| 欧美日韩免费在线视频| 国产一区视频导航| 怡红院av一区二区三区| 日韩欧美一二三区| 91片黄在线观看| 美女视频网站久久| 福利一区二区在线| 欧美性生活影院| 久久久久久久久蜜桃| 中文字幕佐山爱一区二区免费| 亚洲影院理伦片| 久久av老司机精品网站导航| 99re这里只有精品首页| 欧美一区二区日韩| 成人免费在线播放视频| 蜜臀av性久久久久蜜臀aⅴ| 成人一区二区三区视频| 欧美日韩国产首页| 中文字幕高清不卡| 美日韩一级片在线观看| voyeur盗摄精品| 日韩欧美国产一区二区三区| 亚洲精品视频观看| 国产一区不卡视频| 制服丝袜一区二区三区| 中文字幕字幕中文在线中不卡视频| 蜜臀久久99精品久久久久久9| a4yy欧美一区二区三区| 日韩美女一区二区三区四区| 亚洲激情图片一区| 国产露脸91国语对白| 777亚洲妇女| 一区二区三区产品免费精品久久75| 激情综合网激情| 欧美精品1区2区| 亚洲一区精品在线| 94-欧美-setu| 中文字幕电影一区| 国产精品自拍网站| 欧美精品一区二区精品网| 偷拍与自拍一区| 在线日韩国产精品| 亚洲黄色尤物视频| 99re这里只有精品首页| 国产精品美女一区二区在线观看| 国产在线精品一区二区三区不卡| 56国语精品自产拍在线观看| 亚洲午夜精品网| 在线观看一区日韩| 一区二区三区视频在线观看 | 欧美亚洲一区二区在线观看| 国产精品视频线看| 成人一区二区三区中文字幕| 久久精品一区二区三区四区| 国模套图日韩精品一区二区| 2021久久国产精品不只是精品| 免费高清在线视频一区·| 91精品国产综合久久香蕉的特点 | 日韩欧美www| 久热成人在线视频| 2020国产精品| 高清国产午夜精品久久久久久| 国产亚洲成aⅴ人片在线观看| 国产经典欧美精品| 国产精品第13页| 91视频在线观看免费| 一区二区三区在线看| 精品视频在线看| 日韩1区2区日韩1区2区| 欧美成人国产一区二区| 国产成人日日夜夜| 亚洲天堂2016| 欧美精选一区二区| 久久se精品一区精品二区| 国产欧美日韩久久| 欧美在线一区二区三区| 日韩黄色免费电影| 国产日韩亚洲欧美综合| 日本福利一区二区| 老司机一区二区| 国产精品乱码人人做人人爱| 91激情五月电影| 久久99国产精品久久| 国产精品久久久久久久浪潮网站| 欧洲生活片亚洲生活在线观看| 日韩电影在线一区二区| 国产日韩欧美精品一区| 欧美系列在线观看| 国产精品一区在线| 亚洲一区二区三区美女| 欧美成人高清电影在线| 色中色一区二区| 精品综合久久久久久8888| **欧美大码日韩| 精品免费视频.| 日本高清不卡aⅴ免费网站| 韩日av一区二区| 亚洲电影第三页| 国产精品网友自拍| 欧美变态tickle挠乳网站| 日本韩国精品在线| 国产91对白在线观看九色| 亚洲成在人线免费| 亚洲欧洲日产国码二区| 精品国产91乱码一区二区三区| 一本一道综合狠狠老| 国产成人日日夜夜| 久久精品国产精品亚洲精品| 亚洲黄色尤物视频| 国产精品进线69影院| 精品国产乱码久久久久久影片| 欧美亚洲综合另类| 99国产精品久久久久久久久久| 国产另类ts人妖一区二区| 日韩av一区二区在线影视| 亚洲另类一区二区| 国产精品午夜电影| 久久久www成人免费毛片麻豆 | 91在线观看美女| 成人一二三区视频| 国产一区二区三区在线观看免费| 午夜精品视频一区| 亚洲电影你懂得| 亚洲成人一区在线| 一区二区三区产品免费精品久久75| 中文字幕中文乱码欧美一区二区| 久久久精品国产99久久精品芒果| 欧美日精品一区视频| 日本一区二区三区dvd视频在线| 美女www一区二区| 欧美日韩的一区二区| 一区二区在线免费| 91丨porny丨国产| 中文字幕在线不卡| 懂色av一区二区三区免费观看| 2020国产精品自拍| 国内久久婷婷综合| 欧美mv日韩mv国产网站app| 男人操女人的视频在线观看欧美 | 奇米精品一区二区三区在线观看| 在线亚洲高清视频| 亚洲激情在线激情| 一本一道波多野结衣一区二区 | 亚洲成a天堂v人片| 欧美在线免费观看视频| 亚洲一区日韩精品中文字幕| 91精品福利视频| 亚洲综合成人在线| 欧美日韩国产另类不卡| 亚洲成人第一页| 国产日韩欧美亚洲| 成人久久18免费网站麻豆| 国产精品免费视频网站| 成人黄色在线看| 中文字幕中文字幕一区| 色综合激情五月| 午夜不卡av在线| 欧美成人精品1314www| 国产一区二区三区不卡在线观看| www激情久久| www.99精品| 亚洲综合一区在线| 欧美一区二区视频观看视频| 精品一区二区三区免费| 日韩欧美美女一区二区三区| 久久99久久99| 国产欧美在线观看一区| 99re6这里只有精品视频在线观看 99re8在线精品视频免费播放 | 精品一区二区日韩| 久久精品人人做人人爽97| 国产91综合网| 亚洲精品中文在线影院| 欧美久久一二区| 国产毛片精品视频| 国产精品毛片大码女人| 欧洲一区在线电影| 久久精品国产亚洲一区二区三区| 久久色在线视频| 91久久免费观看| 国产在线视视频有精品| 日本一区二区三区四区| 91亚洲精品乱码久久久久久蜜桃 |