ucHeaderType = ucNextHeader;
while (!bDone) {
pucNextHeader = GetNextIPV6ChainedHeader(&pIpv6HdrScanContext,
- &ucHeaderType, &bDone, &usPayloadLength);
+ &ucHeaderType,
+ &bDone,
+ &usPayloadLength);
if (bDone) {
if ((ucHeaderType == TCP_HEADER_TYPE) ||
(ucHeaderType == UDP_HEADER_TYPE)) {
/*
- * Arg 1 struct bcm_mini_adapter *Adapter is a pointer ot the driver contorl structure
+ * Arg 1 struct bcm_mini_adapter *Adapter is a pointer ot the driver control
+ * structure
* Arg 2 PVOID pcIpHeader is a pointer to the IP header of the packet
*/
USHORT IpVersion6(struct bcm_mini_adapter *Adapter, PVOID pcIpHeader,
- struct bcm_classifier_rule *pstClassifierRule)
+ struct bcm_classifier_rule *pstClassifierRule)
{
USHORT ushDestPort = 0;
USHORT ushSrcPort = 0;
* Try to get the next higher layer protocol
* and the Ports Nos if TCP or UDP
*/
- ucNextProtocolAboveIP = GetIpv6ProtocolPorts((UCHAR *)(pcIpHeader + sizeof(struct bcm_ipv6_hdr)),
- &ushSrcPort,
- &ushDestPort,
- pstIpv6Header->usPayloadLength,
- pstIpv6Header->ucNextHeader);
+ ucNextProtocolAboveIP = GetIpv6ProtocolPorts((UCHAR *)(pcIpHeader +
+ sizeof(struct bcm_ipv6_hdr)),
+ &ushSrcPort,
+ &ushDestPort,
+ pstIpv6Header->usPayloadLength,
+ pstIpv6Header->ucNextHeader);
do {
if (pstClassifierRule->ucDirection == 0) {
}
bClassificationSucceed = MatchSrcIpv6Address(pstClassifierRule,
- pstIpv6Header);
+ pstIpv6Header);
if (!bClassificationSucceed)
break;
bClassificationSucceed = MatchDestIpv6Address(pstClassifierRule,
- pstIpv6Header);
+ pstIpv6Header);
if (!bClassificationSucceed)
break;
* Chain of IPv6 prot headers
*/
bClassificationSucceed = MatchProtocol(pstClassifierRule,
- ucNextProtocolAboveIP);
+ ucNextProtocolAboveIP);
if (!bClassificationSucceed)
break;
DBG_LVL_ALL, "\nIPv6 Source Port:%x\n",
ntohs(ushSrcPort));
bClassificationSucceed = MatchSrcPort(pstClassifierRule,
- ntohs(ushSrcPort));
+ ntohs(ushSrcPort));
if (!bClassificationSucceed)
break;
/* Match Dest Port */
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL, "\nIPv6 Destination Port:%x\n",
+ DBG_LVL_ALL,
+ "\nIPv6 Destination Port:%x\n",
ntohs(ushDestPort));
bClassificationSucceed = MatchDestPort(pstClassifierRule,
- ntohs(ushDestPort));
+ ntohs(ushDestPort));
if (!bClassificationSucceed)
break;
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG,
- DBG_LVL_ALL, "\nIPv6 Dest Port Matched");
+ DBG_LVL_ALL,
+ "\nIPv6 Dest Port Matched");
}
} while (0);
if (bClassificationSucceed == TRUE) {
INT iMatchedSFQueueIndex = 0;
- iMatchedSFQueueIndex = SearchSfid(Adapter, pstClassifierRule->ulSFID);
+ iMatchedSFQueueIndex = SearchSfid(Adapter,
+ pstClassifierRule->ulSFID);
if ((iMatchedSFQueueIndex >= NO_OF_QUEUES) ||
(Adapter->PackInfo[iMatchedSFQueueIndex].bActive == false))
bClassificationSucceed = false;
* This is the no. of Src Addresses ie Range of IP Addresses contained
* in the classifier rule for which we need to match
*/
- UINT uiCountIPSrcAddresses = (UINT)pstClassifierRule->ucIPSourceAddressLength;
+ UINT uiCountIPSrcAddresses =
+ (UINT)pstClassifierRule->ucIPSourceAddressLength;
if (uiCountIPSrcAddresses == 0)
/* First Convert the Ip Address in the packet to Host Endian order */
- for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++)
- aulSrcIP[uiIpv6AddIndex] = ntohl(pstIpv6Header->ulSrcIpAddress[uiIpv6AddIndex]);
-
- for (uiLoopIndex = 0; uiLoopIndex < uiCountIPSrcAddresses; uiLoopIndex += uiIpv6AddrNoLongWords) {
+ for (uiIpv6AddIndex = 0;
+ uiIpv6AddIndex < uiIpv6AddrNoLongWords;
+ uiIpv6AddIndex++)
+ aulSrcIP[uiIpv6AddIndex] =
+ ntohl(pstIpv6Header->ulSrcIpAddress[uiIpv6AddIndex]);
+
+ for (uiLoopIndex = 0;
+ uiLoopIndex < uiCountIPSrcAddresses;
+ uiLoopIndex += uiIpv6AddrNoLongWords) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL,
"\n Src Ipv6 Address In Received Packet :\n ");
DumpIpv6Address(aulSrcIP);
"\n Src Ipv6 Address In Classifier Rule :\n");
DumpIpv6Address(&src_addr->ulIpv6Addr[uiLoopIndex]);
- for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
- if ((src_addr->ulIpv6Mask[uiLoopIndex+uiIpv6AddIndex] & aulSrcIP[uiIpv6AddIndex])
- != src_addr->ulIpv6Addr[uiLoopIndex+uiIpv6AddIndex]) {
+ for (uiIpv6AddIndex = 0;
+ uiIpv6AddIndex < uiIpv6AddrNoLongWords;
+ uiIpv6AddIndex++) {
+ if ((src_addr->ulIpv6Mask[uiLoopIndex+uiIpv6AddIndex] &
+ aulSrcIP[uiIpv6AddIndex]) !=
+ src_addr->ulIpv6Addr[uiLoopIndex+uiIpv6AddIndex]) {
/*
* Match failed for current Ipv6 Address
* Try next Ipv6 Address
* ie Range of IP Addresses contained in the classifier rule
* for which we need to match
*/
- UINT uiCountIPDestinationAddresses = (UINT)pstClassifierRule->ucIPDestinationAddressLength;
+ UINT uiCountIPDestinationAddresses =
+ (UINT)pstClassifierRule->ucIPDestinationAddressLength;
if (uiCountIPDestinationAddresses == 0)
return TRUE;
/* First Convert the Ip Address in the packet to Host Endian order */
- for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++)
- aulDestIP[uiIpv6AddIndex] = ntohl(pstIpv6Header->ulDestIpAddress[uiIpv6AddIndex]);
-
- for (uiLoopIndex = 0; uiLoopIndex < uiCountIPDestinationAddresses; uiLoopIndex += uiIpv6AddrNoLongWords) {
+ for (uiIpv6AddIndex = 0;
+ uiIpv6AddIndex < uiIpv6AddrNoLongWords;
+ uiIpv6AddIndex++)
+ aulDestIP[uiIpv6AddIndex] =
+ ntohl(pstIpv6Header->ulDestIpAddress[uiIpv6AddIndex]);
+
+ for (uiLoopIndex = 0;
+ uiLoopIndex < uiCountIPDestinationAddresses;
+ uiLoopIndex += uiIpv6AddrNoLongWords) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL,
"\n Destination Ipv6 Address In Received Packet :\n ");
DumpIpv6Address(aulDestIP);
"\n Destination Ipv6 Address In Classifier Rule :\n");
DumpIpv6Address(&dest_addr->ulIpv6Addr[uiLoopIndex]);
- for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
- if ((dest_addr->ulIpv6Mask[uiLoopIndex+uiIpv6AddIndex] & aulDestIP[uiIpv6AddIndex])
- != dest_addr->ulIpv6Addr[uiLoopIndex+uiIpv6AddIndex]) {
+ for (uiIpv6AddIndex = 0;
+ uiIpv6AddIndex < uiIpv6AddrNoLongWords;
+ uiIpv6AddIndex++) {
+ if ((dest_addr->ulIpv6Mask[uiLoopIndex+uiIpv6AddIndex] &
+ aulDestIP[uiIpv6AddIndex]) !=
+ dest_addr->ulIpv6Addr[uiLoopIndex+uiIpv6AddIndex]) {
/*
* Match failed for current Ipv6 Address.
* Try next Ipv6 Address
UINT uiIpv6AddIndex = 0;
struct bcm_mini_adapter *Adapter = GET_BCM_ADAPTER(gblpnetdev);
- for (uiIpv6AddIndex = 0; uiIpv6AddIndex < uiIpv6AddrNoLongWords; uiIpv6AddIndex++) {
+ for (uiIpv6AddIndex = 0;
+ uiIpv6AddIndex < uiIpv6AddrNoLongWords;
+ uiIpv6AddIndex++) {
BCM_DEBUG_PRINT(Adapter, DBG_TYPE_TX, IPV6_DBG, DBG_LVL_ALL,
":%lx", puIpv6Address[uiIpv6AddIndex]);
}