本文整理汇总了Java中org.onosproject.bgpio.types.BgpFsSourcePrefix类的典型用法代码示例。如果您正苦于以下问题:Java BgpFsSourcePrefix类的具体用法?Java BgpFsSourcePrefix怎么用?Java BgpFsSourcePrefix使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BgpFsSourcePrefix类属于org.onosproject.bgpio.types包,在下文中一共展示了BgpFsSourcePrefix类的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeFlowType
import org.onosproject.bgpio.types.BgpFsSourcePrefix; //导入依赖的package包/类
/**
* Write flow type to channel buffer.
*
* @param tlv flow type
* @param cb channel buffer
*/
public static void writeFlowType(BgpValueType tlv, ChannelBuffer cb) {
switch (tlv.getType()) {
case Constants.BGP_FLOWSPEC_DST_PREFIX:
BgpFsDestinationPrefix fsDstPrefix = (BgpFsDestinationPrefix) tlv;
fsDstPrefix.write(cb);
break;
case Constants.BGP_FLOWSPEC_SRC_PREFIX:
BgpFsSourcePrefix fsSrcPrefix = (BgpFsSourcePrefix) tlv;
fsSrcPrefix.write(cb);
break;
case Constants.BGP_FLOWSPEC_IP_PROTO:
BgpFsIpProtocol fsIpProtocol = (BgpFsIpProtocol) tlv;
fsIpProtocol.write(cb);
break;
case Constants.BGP_FLOWSPEC_PORT:
BgpFsPortNum fsPortNum = (BgpFsPortNum) tlv;
fsPortNum.write(cb);
break;
case Constants.BGP_FLOWSPEC_DST_PORT:
BgpFsDestinationPortNum fsDstPortNum = (BgpFsDestinationPortNum) tlv;
fsDstPortNum.write(cb);
break;
case Constants.BGP_FLOWSPEC_SRC_PORT:
BgpFsSourcePortNum fsSrcPortNum = (BgpFsSourcePortNum) tlv;
fsSrcPortNum.write(cb);
break;
case Constants.BGP_FLOWSPEC_ICMP_TP:
BgpFsIcmpType fsIcmpType = (BgpFsIcmpType) tlv;
fsIcmpType.write(cb);
break;
case Constants.BGP_FLOWSPEC_ICMP_CD:
BgpFsIcmpCode fsIcmpCode = (BgpFsIcmpCode) tlv;
fsIcmpCode.write(cb);
break;
case Constants.BGP_FLOWSPEC_TCP_FLAGS:
BgpFsTcpFlags fsTcpFlags = (BgpFsTcpFlags) tlv;
fsTcpFlags.write(cb);
break;
case Constants.BGP_FLOWSPEC_PCK_LEN:
BgpFsPacketLength fsPacketLen = (BgpFsPacketLength) tlv;
fsPacketLen.write(cb);
break;
case Constants.BGP_FLOWSPEC_DSCP:
BgpFsDscpValue fsDscpVal = (BgpFsDscpValue) tlv;
fsDscpVal.write(cb);
break;
case Constants.BGP_FLOWSPEC_FRAGMENT:
BgpFsFragment fsFragment = (BgpFsFragment) tlv;
fsFragment.write(cb);
break;
default:
break;
}
return;
}