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

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

?? mld6igmp_source_record.cc

?? MLDv2 support igmpv3 lite
?? CC
字號:
// -*- c-basic-offset: 4; tab-width: 8; indent-tabs-mode: t -*-// Copyright (c) 2001-2008 XORP, Inc.//// Permission is hereby granted, free of charge, to any person obtaining a// copy of this software and associated documentation files (the "Software")// to deal in the Software without restriction, subject to the conditions// listed in the XORP LICENSE file. These conditions include: you must// preserve this copyright notice, and you cannot mention the copyright// holders in advertising related to the Software without their permission.// The Software is provided WITHOUT ANY WARRANTY, EXPRESS OR IMPLIED. This// notice is a summary of the XORP LICENSE file; the license in that file is// legally binding.#ident "$XORP: xorp/contrib/mld6igmp_lite/mld6igmp_source_record.cc,v 1.2 2008/07/23 05:09:49 pavlin Exp $"//// Multicast source record information used by IGMPv3 (RFC 3376) and// MLDv2 (RFC 3810).//#include "mld6igmp_module.h"#include "libxorp/xorp.h"#include "libxorp/xlog.h"#include "libxorp/debug.h"#include "libxorp/ipvx.hh"#include "mld6igmp_source_record.hh"#include "mld6igmp_group_record.hh"#include "mld6igmp_vif.hh"//// Exported variables////// Local constants definitions////// Local structures/classes, typedefs and macros////// Local variables////// Local functions prototypes///** * Mld6igmpSourceRecord::Mld6igmpSourceRecord: * @group_record: The group record this entry belongs to. * @source: The entry source address. *  * Return value:  **/Mld6igmpSourceRecord::Mld6igmpSourceRecord(Mld6igmpGroupRecord& group_record,					   const IPvX& source)    : _group_record(group_record),      _source(source),      _query_retransmission_count(0){    }/** * Mld6igmpSourceRecord::~Mld6igmpSourceRecord: * @:  *  * Mld6igmpSourceRecord destructor. **/Mld6igmpSourceRecord::~Mld6igmpSourceRecord(){}/** * Set the source timer. * * @param timeval the timeout interval of the source timer. */voidMld6igmpSourceRecord::set_source_timer(const TimeVal& timeval){    EventLoop& eventloop = _group_record.eventloop();    _source_timer = eventloop.new_oneoff_after(	timeval,	callback(this, &Mld6igmpSourceRecord::source_timer_timeout));}/** * Cancel the source timer. */voidMld6igmpSourceRecord::cancel_source_timer(){    _source_timer.unschedule();}/** * Lower the source timer. * * @param timeval the timeout interval the source timer should be * lowered to. */voidMld6igmpSourceRecord::lower_source_timer(const TimeVal& timeval){    EventLoop& eventloop = _group_record.eventloop();    TimeVal timeval_remaining;    //    // Lower the source timer    //    _source_timer.time_remaining(timeval_remaining);    if (timeval < timeval_remaining) {	_source_timer = eventloop.new_oneoff_after(	    timeval,	    callback(this, &Mld6igmpSourceRecord::source_timer_timeout));    }}/** * Timeout: the source timer has expired. */voidMld6igmpSourceRecord::source_timer_timeout(){    _group_record.source_expired(this);}/** * Get the number of seconds until the source timer expires. *  * @return the number of seconds until the source timer expires. */uint32_tMld6igmpSourceRecord::timeout_sec() const{    TimeVal tv;        _source_timer.time_remaining(tv);        return (tv.sec());}/** * Constructor for a given group record. * * @param group_record the group record this set belongs to. */Mld6igmpSourceSet::Mld6igmpSourceSet(Mld6igmpGroupRecord& group_record)    : _group_record(group_record){}/** * Destructor. */Mld6igmpSourceSet::~Mld6igmpSourceSet(){    // XXX: don't delete the payload, because it might be used elsewhere}/** * Find a source record. * * @param source the source address. * @return the corresponding source record (@ref Mld6igmpSourceRecord) * if found, otherwise NULL. */Mld6igmpSourceRecord*Mld6igmpSourceSet::find_source_record(const IPvX& source){    Mld6igmpSourceSet::iterator iter = this->find(source);    if (iter != this->end())	return (iter->second);    return (NULL);}/** * Delete the payload of the set, and clear the set itself. */voidMld6igmpSourceSet::delete_payload_and_clear(){    Mld6igmpSourceSet::iterator iter;    //    // Delete the payload of the set    //    for (iter = this->begin(); iter != this->end(); ++iter) {	Mld6igmpSourceRecord* source_record = iter->second;	delete source_record;    }    //    // Clear the set itself    //    this->clear();}/** * Assignment operator for sets. * * @param other the right-hand operand. * @return the assigned set. */Mld6igmpSourceSet&Mld6igmpSourceSet::operator=(const Mld6igmpSourceSet& other){    Mld6igmpSourceSet::const_iterator iter;    XLOG_ASSERT(&_group_record == &(other._group_record));    this->clear();    //    // Copy the payload of the set    //    for (iter = other.begin(); iter != other.end(); ++iter) {	insert(make_pair(iter->first, iter->second));    }    return (*this);}/** * UNION operator for sets. * * @param other the right-hand operand. * @return the union of two sets. Note that if an element is in * both sets, we use the value from the first set. */Mld6igmpSourceSetMld6igmpSourceSet::operator+(const Mld6igmpSourceSet& other){    Mld6igmpSourceSet result(*this);	// XXX: all elements from the first set    Mld6igmpSourceSet::const_iterator iter;    //    // Insert all elements from the second set that are not in the first set    //    for (iter = other.begin(); iter != other.end(); ++iter) {	const IPvX& ipvx = iter->first;	if (result.find(ipvx) == result.end())	    result.insert(make_pair(iter->first, iter->second));    }    return (result);}/** * UNION operator for sets when the second operand is a set of IPvX * addresses. * * @param other the right-hand operand. * @return the union of two sets. Note that if an element is not in the * first set, then it is created (see @ref Mld6igmpSourceRecord). */Mld6igmpSourceSetMld6igmpSourceSet::operator+(const set<IPvX>& other){    Mld6igmpSourceSet result(*this);	// XXX: all elements from the first set    set<IPvX>::const_iterator iter;    Mld6igmpSourceRecord* source_record;    //    // Insert all elements from the second set that are not in the first set    //    for (iter = other.begin(); iter != other.end(); ++iter) {	const IPvX& ipvx = *iter;	if (result.find(ipvx) == result.end()) {	    source_record = new Mld6igmpSourceRecord(_group_record, ipvx);	    result.insert(make_pair(ipvx, source_record));	}    }    return (result);}/** * INTERSECTION operator for sets. * * @param other the right-hand operand. * @return the intersection of two sets. Note that we use the values * from the first set. */Mld6igmpSourceSetMld6igmpSourceSet::operator*(const Mld6igmpSourceSet& other){    Mld6igmpSourceSet result(_group_record);    Mld6igmpSourceSet::const_iterator iter;    //    // Insert all elements from the first set that are also in the second set    //    for (iter = this->begin(); iter != this->end(); ++iter) {	const IPvX& ipvx = iter->first;	if (other.find(ipvx) != other.end())	    result.insert(make_pair(iter->first, iter->second));    }    return (result);}/** * INTERSECTION operator for sets when the second operand is a set of IPvX * addresses. * * @param other the right-hand operand. * @return the intersection of two sets. Note that we use the values * from the first set. */Mld6igmpSourceSetMld6igmpSourceSet::operator*(const set<IPvX>& other){    Mld6igmpSourceSet result(_group_record);    Mld6igmpSourceSet::const_iterator iter;    //    // Insert all elements from the first set that are also in the second set    //    for (iter = this->begin(); iter != this->end(); ++iter) {	const IPvX& ipvx = iter->first;	if (other.find(ipvx) != other.end())	    result.insert(make_pair(iter->first, iter->second));    }    return (result);}/** * REMOVAL operator for sets. * * @param other the right-hand operand. * @return the elements from the first set (after the elements from * the right-hand set have been removed). */Mld6igmpSourceSetMld6igmpSourceSet::operator-(const Mld6igmpSourceSet& other){    Mld6igmpSourceSet result(_group_record);    Mld6igmpSourceSet::const_iterator iter;    //    // Insert all elements from the first set that are not in the second set    //    for (iter = this->begin(); iter != this->end(); ++iter) {	const IPvX& ipvx = iter->first;	if (other.find(ipvx) == other.end())	    result.insert(make_pair(iter->first, iter->second));    }    return (result);}/** * REMOVAL operator for sets when the second operand is a set of IPvX * addresses. * * @param other the right-hand operand. * @return the elements from the first set (after the elements from * the right-hand set have been removed). */Mld6igmpSourceSetMld6igmpSourceSet::operator-(const set<IPvX>& other){    Mld6igmpSourceSet result(_group_record);    Mld6igmpSourceSet::const_iterator iter;    //    // Insert all elements from the first set that are not in the second set    //    for (iter = this->begin(); iter != this->end(); ++iter) {	const IPvX& ipvx = iter->first;	if (other.find(ipvx) == other.end())	    result.insert(make_pair(iter->first, iter->second));    }    return (result);}/** * Set the source timer for a set of source addresses. * * @param sources the set of source addresses whose source timer will * be set. * @param timeval the timeout interval of the source timer. */voidMld6igmpSourceSet::set_source_timer(const set<IPvX>& sources,				    const TimeVal& timeval){    set<IPvX>::const_iterator iter;    Mld6igmpSourceSet::iterator record_iter;    for (iter = sources.begin(); iter != sources.end(); ++iter) {	const IPvX& ipvx = *iter;	record_iter = this->find(ipvx);	if (record_iter != this->end()) {	    Mld6igmpSourceRecord* source_record = record_iter->second;	    source_record->set_source_timer(timeval);	}    }}/** * Set the source timer for all source addresses. * * @param timeval the timeout interval of the source timer. */voidMld6igmpSourceSet::set_source_timer(const TimeVal& timeval){    Mld6igmpSourceSet::iterator iter;    for (iter = this->begin(); iter != this->end(); ++iter) {	Mld6igmpSourceRecord* source_record = iter->second;	source_record->set_source_timer(timeval);    }}/** * Cancel the source timer for a set of source addresses. * * @param sources the set of source addresses whose source timer will * be canceled. */voidMld6igmpSourceSet::cancel_source_timer(const set<IPvX>& sources){    set<IPvX>::const_iterator iter;    Mld6igmpSourceSet::iterator record_iter;    for (iter = sources.begin(); iter != sources.end(); ++iter) {	const IPvX& ipvx = *iter;	record_iter = this->find(ipvx);	if (record_iter != this->end()) {	    Mld6igmpSourceRecord* source_record = record_iter->second;	    source_record->cancel_source_timer();	}    }}/** * Cancel the source timer for all source addresses. */voidMld6igmpSourceSet::cancel_source_timer(){    Mld6igmpSourceSet::iterator iter;    for (iter = this->begin(); iter != this->end(); ++iter) {	Mld6igmpSourceRecord* source_record = iter->second;	source_record->cancel_source_timer();    }}/** * Lower the source timer for a set of sources. * * @param sources the source addresses. * @param timeval the timeout interval the source timer should be * lowered to. */voidMld6igmpSourceSet::lower_source_timer(const set<IPvX>& sources,				      const TimeVal& timeval){    set<IPvX>::const_iterator iter;    Mld6igmpSourceSet::iterator record_iter;    for (iter = sources.begin(); iter != sources.end(); ++iter) {	const IPvX& ipvx = *iter;	record_iter = this->find(ipvx);	if (record_iter != this->end()) {	    Mld6igmpSourceRecord* source_record = record_iter->second;	    source_record->lower_source_timer(timeval);	}    }}/** * Extract the set of source addresses. * * @return the set with the source addresses. */set<IPvX>Mld6igmpSourceSet::extract_source_addresses() const{    set<IPvX> sources;    Mld6igmpSourceSet::const_iterator record_iter;    for (record_iter = this->begin();	 record_iter != this->end();	 ++record_iter) {	const Mld6igmpSourceRecord* source_record = record_iter->second;	const IPvX& ipvx = source_record->source();	sources.insert(ipvx);    }    return (sources);}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美日韩在线电影| 国产91丝袜在线播放九色| 欧美日韩不卡一区| 日韩电影免费在线看| 精品理论电影在线观看 | 久久精品欧美一区二区三区不卡| 精品在线观看视频| 国产欧美日韩在线看| 91欧美一区二区| 亚洲一线二线三线视频| 91精品国产麻豆国产自产在线| 青青草原综合久久大伊人精品 | 91热门视频在线观看| 亚洲一区二区视频在线观看| 欧美一区二区三区免费| 国产成人亚洲综合a∨猫咪| 成人免费在线观看入口| 欧美日韩在线三级| 国产一区二区伦理| 一区二区三区在线视频观看| 日韩一卡二卡三卡| 91免费看视频| 麻豆国产精品官网| 亚洲日本在线观看| 欧美日韩一级片网站| 国产毛片精品视频| 亚州成人在线电影| 国产欧美日韩久久| 欧美丰满高潮xxxx喷水动漫| 成人性生交大片免费看中文| 水野朝阳av一区二区三区| 国产精品免费看片| 日韩精品最新网址| 国产精品三级久久久久三级| 欧美精品日韩一区| 成人av午夜影院| 免费成人在线影院| 亚洲免费大片在线观看| 久久综合九色综合久久久精品综合| 91视频com| 国产酒店精品激情| 蜜臀国产一区二区三区在线播放| 中文字幕一区视频| 久久精品男人的天堂| 91精品欧美福利在线观看| 91丨porny丨户外露出| 国产做a爰片久久毛片| 日日摸夜夜添夜夜添亚洲女人| 国产精品午夜免费| 久久久蜜桃精品| 日韩精品一区二区三区在线 | 欧美高清激情brazzers| 99re在线精品| 丁香激情综合五月| 国产美女久久久久| 日韩激情在线观看| 五月天精品一区二区三区| 亚洲欧洲另类国产综合| 国产三级精品在线| 精品久久久久一区| 91精品国产欧美一区二区成人 | 成人精品电影在线观看| 激情文学综合丁香| 蜜桃av一区二区三区电影| 亚洲一区影音先锋| 亚洲激情自拍视频| 亚洲精品欧美专区| 一区二区高清在线| 亚洲欧美日韩在线| 亚洲精品美国一| 亚洲青青青在线视频| 亚洲欧美日韩国产一区二区三区| 日本一区二区不卡视频| 国产精品久久福利| 国产精品萝li| 亚洲色图制服诱惑| 一区二区三区在线视频免费观看| 亚洲美女偷拍久久| 亚洲综合一二区| 亚洲成av人片一区二区三区| 午夜精品爽啪视频| 日韩不卡手机在线v区| 美女被吸乳得到大胸91| 国产自产视频一区二区三区| 国产成人在线视频网站| 成人深夜福利app| av亚洲精华国产精华| 91国偷自产一区二区三区观看| 日本二三区不卡| 制服丝袜在线91| 精品国产一区二区亚洲人成毛片 | 日韩一区二区三区av| 久久只精品国产| 国产欧美日韩在线视频| 亚洲素人一区二区| 亚洲一区二区三区四区五区中文| 日韩国产欧美在线视频| 国产一区二区三区四| 99久久久久久| 欧美日韩免费观看一区二区三区| 日韩一区二区三区免费观看| 久久精品视频一区二区| 亚洲精品国产品国语在线app| 天天爽夜夜爽夜夜爽精品视频| 极品少妇xxxx偷拍精品少妇| 成人一区二区三区视频| 欧美午夜电影网| 国产亚洲人成网站| 一区二区视频在线看| 婷婷丁香久久五月婷婷| 国产老妇另类xxxxx| 色综合久久久久综合99| 91精品免费观看| 国产日产欧美一区二区三区| 亚洲影院久久精品| 国模冰冰炮一区二区| 日本丰满少妇一区二区三区| 欧美成人在线直播| 亚洲日韩欧美一区二区在线| 美女任你摸久久| 91视视频在线观看入口直接观看www| 欧美日韩国产小视频在线观看| 2欧美一区二区三区在线观看视频 337p粉嫩大胆噜噜噜噜噜91av | 亚洲一区二区三区小说| 国产精品一区免费在线观看| 91官网在线观看| 国产女同性恋一区二区| 天涯成人国产亚洲精品一区av| 国产精华液一区二区三区| 欧美疯狂做受xxxx富婆| 亚洲免费在线播放| 国产精品一二三四五| 欧美精品 国产精品| 国产精品成人在线观看| 国产一区二区日韩精品| 欧美日韩国产高清一区| 中文字幕亚洲欧美在线不卡| 精品亚洲国产成人av制服丝袜| 色婷婷亚洲一区二区三区| 国产日本一区二区| 奇米色一区二区| 欧美美女一区二区三区| 亚洲精品va在线观看| 成人午夜又粗又硬又大| 精品久久久久久最新网址| 日韩国产欧美视频| 欧美午夜不卡在线观看免费| 中文字幕一区二区三区在线不卡| 国产一区二区精品在线观看| 欧美大片在线观看一区| 亚洲一区二区欧美日韩| 色综合天天在线| 国产精品色婷婷久久58| 国产裸体歌舞团一区二区| 日韩欧美国产一区在线观看| 日本91福利区| 欧美高清www午色夜在线视频| 亚洲人成精品久久久久久| 懂色av一区二区三区免费看| 久久九九久精品国产免费直播| 毛片av一区二区| 日韩免费福利电影在线观看| 青青草国产成人av片免费| 欧美日韩的一区二区| 亚洲国产精品久久久久婷婷884 | 91福利在线导航| 亚洲欧美激情小说另类| av在线这里只有精品| 亚洲婷婷综合久久一本伊一区| 成人午夜av电影| 中文字幕在线不卡视频| 97精品电影院| 一区二区三区四区乱视频| 久久久久久亚洲综合| 国产.欧美.日韩| 欧美激情综合五月色丁香 | 激情小说亚洲一区| 欧美变态tickling挠脚心| 九九在线精品视频| 国产色产综合色产在线视频| 高清不卡一区二区| 国产精品福利一区| 91麻豆福利精品推荐| 亚洲6080在线| 日韩午夜精品视频| 国产精品白丝jk白祙喷水网站| 日本一区二区电影| 色一情一伦一子一伦一区| 偷拍一区二区三区| 久久久综合精品| 91丨porny丨蝌蚪视频| 亚洲香蕉伊在人在线观| 日韩精品一区二区三区老鸭窝| 国产麻豆成人传媒免费观看| 亚洲美女视频一区| 69久久99精品久久久久婷婷| 国产一区在线看| 一区二区三区蜜桃网| 欧美一级精品在线| 成人免费视频一区二区|