本文整理匯總了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;
}