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

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

?? ftencode.c

?? netflow,抓包
?? C
?? 第 1 頁 / 共 4 頁
字號:
/* * Copyright (c) 2001 Mark Fullmer and The Ohio State University * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * 1. Redistributions of source code must retain the above copyright *    notice, this list of conditions and the following disclaimer. * 2. Redistributions in binary form must reproduce the above copyright *    notice, this list of conditions and the following disclaimer in the *    documentation and/or other materials provided with the distribution. * * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * *      $Id: ftencode.c,v 1.13 2003/02/13 02:38:41 maf Exp $ */#include "ftconfig.h"#include "ftlib.h"#if HAVE_STRINGS_H #include <strings.h>#endif#if HAVE_STRING_H  #include <string.h>#endif/* * function: ftencode_init *  * Initialize a ftencode structure, must be called before * first attempt to encode pdu with fts3rec_*_encode()*/void ftencode_init(struct ftencode *enc, int flags){  bzero(enc, sizeof (struct ftencode));  enc->flags = flags;  if (enc->flags & FT_ENC_FLAGS_IPHDR)    enc->buf_enc = (char*)&enc->buf + FT_ENC_IPHDR_LEN;  else    enc->buf_enc = (char*)&enc->buf;  } /* ftencode_init *//* * function: ftencode_reset *  * Use between successive calls to f2s2rec_*_encode()*/void ftencode_reset(struct ftencode *enc){  int len;  if (enc->flags & FT_ENC_FLAGS_IPHDR)    len = FT_IO_MAXENCODE -  FT_ENC_IPHDR_LEN;  else    len = FT_IO_MAXENCODE;  bzero (enc->buf_enc, len);  enc->buf_size = 0;} /* ftencode_reset *//* * function: ftencode_sum_data *           * calculate checksum of PDU (just the data) * */void ftencode_sum_data(struct ftencode *enc){           int size;  u_short *word;  int sum;    sum = 0;  size = enc->buf_size;  word = (u_short*)enc->buf_enc;              for (size = enc->buf_size; size > 1; size -=2)    sum += *word++;              /* odd byte */  if (size == 1)    sum += htons(*(u_char*)word<<8);  enc->d_sum = sum;} /* ftencode_cksum_data *//* * function: fts3rec_pdu_encode * * Encode any type f2s2rec_* into a PDU * wrapper function for other f2s2rec_pdu_*_encode * * Note ftencode_init() must be called on the ftencode * first, and ftencode_reset() must be called after each * PDU is processed by the caller before calling this * function again. * * returns: -1 error encoding, PDU not encoded. *           0 PDU encoded.  Hint next call will fail. *           1 PDU encoded.  Room for more. * */int fts3rec_pdu_encode(struct ftencode *enc, void *rec){  switch (enc->ver.d_version) {    case 1:      return (fts3rec_pdu_v1_encode(enc, (struct fts3rec_v1*)rec));      break;    case 5:      return (fts3rec_pdu_v5_encode(enc, (struct fts3rec_v5*)rec));      break;    case 6:      return (fts3rec_pdu_v6_encode(enc, (struct fts3rec_v6*)rec));      break;    case 7:      return (fts3rec_pdu_v7_encode(enc, (struct fts3rec_v7*)rec));      break;    case 8:      switch (enc->ver.agg_method) {        case 1:          return (fts3rec_pdu_v8_1_encode(enc, (struct fts3rec_v8_1*)rec));          break;        case 2:          return (fts3rec_pdu_v8_2_encode(enc, (struct fts3rec_v8_2*)rec));          break;        case 3:          return (fts3rec_pdu_v8_3_encode(enc, (struct fts3rec_v8_3*)rec));          break;        case 4:          return (fts3rec_pdu_v8_4_encode(enc, (struct fts3rec_v8_4*)rec));          break;        case 5:          return (fts3rec_pdu_v8_5_encode(enc, (struct fts3rec_v8_5*)rec));          break;        case 6:          return (fts3rec_pdu_v8_6_encode(enc, (struct fts3rec_v8_6*)rec));          break;        case 7:          return (fts3rec_pdu_v8_7_encode(enc, (struct fts3rec_v8_7*)rec));          break;        case 8:          return (fts3rec_pdu_v8_8_encode(enc, (struct fts3rec_v8_8*)rec));          break;        case 9:          return (fts3rec_pdu_v8_9_encode(enc, (struct fts3rec_v8_9*)rec));          break;        case 10:          return (fts3rec_pdu_v8_10_encode(enc, (struct fts3rec_v8_10*)rec));          break;        case 11:          return (fts3rec_pdu_v8_11_encode(enc, (struct fts3rec_v8_11*)rec));          break;        case 12:          return (fts3rec_pdu_v8_12_encode(enc, (struct fts3rec_v8_12*)rec));          break;        case 13:          return (fts3rec_pdu_v8_13_encode(enc, (struct fts3rec_v8_13*)rec));          break;        case 14:          return (fts3rec_pdu_v8_14_encode(enc, (struct fts3rec_v8_14*)rec));          break;      } /* switch */      break;  } /* switch */  return -1;} /* fts3rec_pdu_encode *//* * function: fts3rec_pdu_v1_encode * * Encode a fts3rec into a version 1 PDU * * returns: -1 error encoding, PDU not encoded. *           0 PDU encoded.  Hint next call will fail. *           1 PDU encoded.  Room for more. * */int fts3rec_pdu_v1_encode(struct ftencode *enc, struct fts3rec_v1 *rec_v1){  struct ftpdu_v1 *pdu_v1;  int i;  pdu_v1 = (struct ftpdu_v1*) enc->buf_enc;  i = pdu_v1->count;  /* space to encode more ? */  if (i >= FT_PDU_V1_MAXFLOWS)    return -1;  /* if this is the first record, fill in the header */  if (!i) {    pdu_v1->version = 1;    pdu_v1->sysUpTime = rec_v1->sysUpTime;    pdu_v1->unix_secs = rec_v1->unix_secs;    pdu_v1->unix_nsecs = rec_v1->unix_nsecs;    enc->buf_size = 16; /* pdu header size */  } else {    /*  sysUpTime, unix_secs, and unix_nsecs must match for     *  each pdu.  If a stream is being re-encoded this will normally     *  work out fine, if the stream was sorted or changed in some way     *  the PDU may only be able to hold one record.    */    if ((pdu_v1->sysUpTime != rec_v1->sysUpTime) ||        (pdu_v1->unix_secs != rec_v1->unix_secs) ||        (pdu_v1->unix_nsecs != rec_v1->unix_nsecs))        return -1;  }  pdu_v1->records[i].srcaddr = rec_v1->srcaddr;  pdu_v1->records[i].dstaddr = rec_v1->dstaddr;  pdu_v1->records[i].nexthop = rec_v1->nexthop;  pdu_v1->records[i].input = rec_v1->input;  pdu_v1->records[i].output = rec_v1->output;  pdu_v1->records[i].dPkts = rec_v1->dPkts;  pdu_v1->records[i].dOctets = rec_v1->dOctets;  pdu_v1->records[i].First = rec_v1->First;  pdu_v1->records[i].Last = rec_v1->Last;  pdu_v1->records[i].srcport = rec_v1->srcport;  pdu_v1->records[i].dstport = rec_v1->dstport;  pdu_v1->records[i].prot = rec_v1->prot;  pdu_v1->records[i].tos = rec_v1->tos;  pdu_v1->records[i].flags = rec_v1->tcp_flags;  pdu_v1->count ++;  enc->buf_size += sizeof (struct ftrec_v1);  if (pdu_v1->count >= FT_PDU_V1_MAXFLOWS)    return 0;  else    return 1;}/* * function: fts3rec_pdu_v5_encode * * Encode a fts3rec into a version 5 PDU * * returns: -1 error encoding, PDU not encoded. *           0 PDU encoded.  Hint next call will fail. *           1 PDU encoded.  Room for more. * */int fts3rec_pdu_v5_encode(struct ftencode *enc, struct fts3rec_v5 *rec_v5){  struct ftpdu_v5 *pdu_v5;  u_int seq_index;  int i;  pdu_v5 = (struct ftpdu_v5*) enc->buf_enc;  i = pdu_v5->count;  /* index to sequence # */  seq_index = rec_v5->engine_id<<8 | rec_v5->engine_type;  /* space to encode more ? */  if (i >= FT_PDU_V5_MAXFLOWS)    return -1;  /* if this is the first record, fill in the header */  if (!i) {    pdu_v5->version = 5;    pdu_v5->sysUpTime = rec_v5->sysUpTime;    pdu_v5->unix_secs = rec_v5->unix_secs;    pdu_v5->unix_nsecs = rec_v5->unix_nsecs;    pdu_v5->engine_type = rec_v5->engine_type;    pdu_v5->engine_id = rec_v5->engine_id;    pdu_v5->flow_sequence = enc->seq_next[seq_index];    enc->buf_size = 24; /* pdu header size */  } else {    /*  sysUpTime, unix_secs, unix_nsecs, and engine_* must match for     *  each pdu.  If a stream is being re-encoded this will normally     *  work out fine, if the stream was sorted or changed in some way     *  the PDU may only be able to hold one record.    */    if ((pdu_v5->sysUpTime != rec_v5->sysUpTime) ||        (pdu_v5->unix_secs != rec_v5->unix_secs) ||        (pdu_v5->unix_nsecs != rec_v5->unix_nsecs) ||        (pdu_v5->engine_id != rec_v5->engine_id) ||        (pdu_v5->engine_type != rec_v5->engine_type))        return -1;  }  pdu_v5->records[i].srcaddr = rec_v5->srcaddr;  pdu_v5->records[i].dstaddr = rec_v5->dstaddr;  pdu_v5->records[i].nexthop = rec_v5->nexthop;  pdu_v5->records[i].input = rec_v5->input;  pdu_v5->records[i].output = rec_v5->output;  pdu_v5->records[i].dPkts = rec_v5->dPkts;  pdu_v5->records[i].dOctets = rec_v5->dOctets;  pdu_v5->records[i].First = rec_v5->First;  pdu_v5->records[i].Last = rec_v5->Last;  pdu_v5->records[i].srcport = rec_v5->srcport;  pdu_v5->records[i].dstport = rec_v5->dstport;  pdu_v5->records[i].prot = rec_v5->prot;  pdu_v5->records[i].tos = rec_v5->tos;  pdu_v5->records[i].tcp_flags = rec_v5->tcp_flags;  pdu_v5->records[i].src_as = rec_v5->src_as;  pdu_v5->records[i].dst_as = rec_v5->dst_as;  pdu_v5->records[i].src_mask = rec_v5->src_mask;  pdu_v5->records[i].dst_mask = rec_v5->dst_mask;  /* increment sequence # */  enc->seq_next[seq_index]++;  pdu_v5->count ++;  enc->buf_size += sizeof (struct ftrec_v5);  if (pdu_v5->count >= FT_PDU_V5_MAXFLOWS)    return 0;  else    return 1;} /* fts3rec_pdu_v5_encode *//* * function: fts3rec_pdu_v6_encode * * Encode a fts3rec into a version 6 PDU * * returns: -1 error encoding, PDU not encoded. *           0 PDU encoded.  Hint next call will fail. *           1 PDU encoded.  Room for more. * */int fts3rec_pdu_v6_encode(struct ftencode *enc, struct fts3rec_v6 *rec_v6){  struct ftpdu_v6 *pdu_v6;  u_int seq_index;  int i;  pdu_v6 = (struct ftpdu_v6*) enc->buf_enc;  /* index to sequence # */  seq_index = rec_v6->engine_id<<8 | rec_v6->engine_type;  i = pdu_v6->count;  /* space to encode more ? */  if (i >= FT_PDU_V6_MAXFLOWS)    return -1;  /* if this is the first record, fill in the header */  if (!i) {    pdu_v6->version = 6;    pdu_v6->sysUpTime = rec_v6->sysUpTime;    pdu_v6->unix_secs = rec_v6->unix_secs;    pdu_v6->unix_nsecs = rec_v6->unix_nsecs;    pdu_v6->engine_type = rec_v6->engine_type;    pdu_v6->engine_id = rec_v6->engine_id;    pdu_v6->flow_sequence = enc->seq_next[seq_index];    enc->buf_size = 24; /* pdu header size */  } else {    /*  sysUpTime, unix_secs, unix_nsecs, and engine_* must match for     *  each pdu.  If a stream is being re-encoded this will normally     *  work out fine, if the stream was sorted or changed in some way     *  the PDU may only be able to hold one record.    */    if ((pdu_v6->sysUpTime != rec_v6->sysUpTime) ||        (pdu_v6->unix_secs != rec_v6->unix_secs) ||        (pdu_v6->unix_nsecs != rec_v6->unix_nsecs) ||        (pdu_v6->engine_id != rec_v6->engine_id) ||        (pdu_v6->engine_type != rec_v6->engine_type))        return -1;  }  pdu_v6->records[i].srcaddr = rec_v6->srcaddr;

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
午夜电影一区二区| 一道本成人在线| 成人精品小蝌蚪| 成人午夜视频在线| 中文字幕人成不卡一区| 欧美精品一区二区三区蜜臀| 国产成人在线免费观看| 国产精品不卡在线| 国产目拍亚洲精品99久久精品| 国产欧美日韩麻豆91| 国产日韩成人精品| 色欧美乱欧美15图片| 欧美亚洲日本国产| 欧美日韩国产小视频| 日韩一区二区在线免费观看| 91玉足脚交白嫩脚丫在线播放| 91色九色蝌蚪| 欧美性受xxxx| 亚洲午夜激情av| 日韩午夜小视频| 91福利精品第一导航| 亚洲一二三四久久| 一级日本不卡的影视| 亚洲精品美国一| 91精品国产91久久久久久一区二区| 欧美三级三级三级| 日韩一区二区中文字幕| 日韩一区二区三区三四区视频在线观看| 国产精品一区二区x88av| 国产在线麻豆精品观看| 亚洲欧洲日韩一区二区三区| 亚洲免费电影在线| 国产精品麻豆欧美日韩ww| 经典三级视频一区| 国产精品国产三级国产专播品爱网 | 国产日韩一级二级三级| 中文字幕不卡在线播放| 亚洲日本在线观看| 在线综合+亚洲+欧美中文字幕| 精品亚洲成a人在线观看| 国产一区二区91| 国产精品 日产精品 欧美精品| 亚洲综合视频网| 在线看不卡av| 99视频热这里只有精品免费| 国产精品自拍在线| 国产麻豆视频一区二区| 在线精品国精品国产尤物884a| 狠狠网亚洲精品| 国产色爱av资源综合区| 亚洲靠逼com| 亚洲视频你懂的| 韩国三级中文字幕hd久久精品| 91在线看国产| 日韩一区二区影院| 亚洲欧美日韩人成在线播放| 精品国产一二三区| 99久久亚洲一区二区三区青草| 成人18视频在线播放| 色婷婷av一区二区| 丁香婷婷综合网| 国产精品一区二区在线看| 日韩av一区二区在线影视| 欧美精品一区二区在线观看| 日韩欧美一级特黄在线播放| 亚洲视频免费看| 亚洲曰韩产成在线| 亚洲美女一区二区三区| 精品久久一区二区三区| 亚洲图片一区二区| 日本乱码高清不卡字幕| 99热99精品| 人人精品人人爱| 亚洲精品一区二区三区福利| 7777精品伊人久久久大香线蕉最新版| 91精品国产综合久久香蕉麻豆| 日韩一级二级三级精品视频| 国产成人自拍网| 奇米777欧美一区二区| 精品国产乱码久久久久久影片| 97久久久精品综合88久久| 国产欧美一区二区精品性| 久久国产综合精品| 欧美精品123区| 日韩一区二区精品葵司在线| 国产a区久久久| 久久精品一区二区三区av| 久久日一线二线三线suv| 蜜臀av亚洲一区中文字幕| 91精品国产欧美日韩| 一区二区三区精品久久久| 色综合色综合色综合| 中文字幕一区二区不卡 | 国产欧美一区二区三区在线老狼| 蜜臀99久久精品久久久久久软件| 欧美成人三级在线| 国产成人午夜高潮毛片| 国产视频在线观看一区二区三区 | 蜜桃视频在线观看一区| 久久久蜜桃精品| 国产在线视频精品一区| 一区二区理论电影在线观看| 欧美精品亚洲二区| 久久国产麻豆精品| 一区二区三区不卡视频在线观看| 欧美激情一区在线| 欧美顶级少妇做爰| 欧美日韩激情一区二区| 91年精品国产| 在线精品亚洲一区二区不卡| 777午夜精品免费视频| 秋霞av亚洲一区二区三| 国产精品高清亚洲| 欧美一区二区三区不卡| 日本韩国欧美国产| 国产成人av电影在线| 丝袜美腿亚洲一区二区图片| 中文字幕国产精品一区二区| 精品久久久久久久一区二区蜜臀| 91精品国产综合久久蜜臀| 欧美色手机在线观看| 成人性色生活片免费看爆迷你毛片| 日本午夜精品视频在线观看| 一区二区三区免费网站| 成人免费一区二区三区视频| 中国av一区二区三区| 欧美精品一区二| 欧美精品在线观看播放| www.66久久| 欧美亚男人的天堂| 91麻豆精品国产91久久久| 欧美日韩一级片网站| 日韩三级在线免费观看| 精品久久久影院| 日韩一级二级三级| 成人国产免费视频| 色一情一乱一乱一91av| 欧美日韩五月天| 久久精品这里都是精品| 另类小说欧美激情| 成人动漫精品一区二区| 91国在线观看| 久久久久久99久久久精品网站| 亚洲欧美乱综合| 久久99国内精品| 色网综合在线观看| 精品电影一区二区| 亚洲欧美一区二区久久| 男人操女人的视频在线观看欧美| 成人激情午夜影院| 在线电影欧美成精品| 国产精品18久久久久久久网站| 国产成人av电影免费在线观看| 欧美精品色综合| 国产精品伦理在线| 国产精品一区二区在线看| 精品处破学生在线二十三| 亚洲一卡二卡三卡四卡| 欧美日韩久久不卡| av中文一区二区三区| 国产亚洲欧美中文| 国产在线乱码一区二区三区| 91在线观看下载| 中文字幕av一区二区三区| 国产91综合一区在线观看| 久久久久成人黄色影片| 精品无人区卡一卡二卡三乱码免费卡| 日韩高清在线一区| 欧美日韩一区二区在线观看 | 欧美中文字幕一二三区视频| 日韩和欧美一区二区三区| 欧美mv和日韩mv的网站| 菠萝蜜视频在线观看一区| 欧美久久久久久久久中文字幕| 免费成人性网站| 国产精品久久久久久久久果冻传媒| 97国产一区二区| 美女在线一区二区| 亚洲欧美日韩一区| 精品国产污污免费网站入口 | 欧美成人综合网站| 一本久久a久久免费精品不卡| 日本免费在线视频不卡一不卡二| 国产欧美日韩精品在线| 日韩免费视频线观看| 99久久777色| 麻豆国产精品777777在线| 欧美精品一二三| 91成人在线免费观看| 国模少妇一区二区三区| 亚洲成人tv网| 成人欧美一区二区三区小说| 日韩一区二区三区电影| 欧美精品九九99久久| 欧美日韩色综合| 欧美日韩精品综合在线| 欧美日韩一二区| 欧美亚洲国产一区在线观看网站| 国产剧情av麻豆香蕉精品| 国产精品美女一区二区在线观看|