Commit bd33dd31 authored by Kevin McKinney's avatar Kevin McKinney Committed by Greg Kroah-Hartman

Staging: bcm: Fix all white space issues in Protocol.h

This patch fixes all white space issues in
Protocol.h as reported by checkpatch.pl.
Signed-off-by: default avatarKevin McKinney <klmckinney1@gmail.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 8c4f88a8
/************************************ /************************************
* Protocol.h * Protocol.h
*************************************/ *************************************/
#ifndef __PROTOCOL_H__ #ifndef __PROTOCOL_H__
#define __PROTOCOL_H__ #define __PROTOCOL_H__
#define IPV4 4
#define IPV4 4 #define IPV6 6
#define IPV6 6
struct ArpHeader { struct ArpHeader {
struct arphdr arp; struct arphdr arp;
unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */ unsigned char ar_sha[ETH_ALEN]; /* sender hardware address */
unsigned char ar_sip[4]; /* sender IP address */ unsigned char ar_sip[4]; /* sender IP address */
unsigned char ar_tha[ETH_ALEN]; /* target hardware address */ unsigned char ar_tha[ETH_ALEN]; /* target hardware address */
unsigned char ar_tip[4]; /* target IP address */ unsigned char ar_tip[4]; /* target IP address */
}/*__attribute__((packed))*/; } /*__attribute__((packed))*/;
struct TransportHeaderT struct TransportHeaderT
{ {
...@@ -28,13 +25,12 @@ struct TransportHeaderT ...@@ -28,13 +25,12 @@ struct TransportHeaderT
} __attribute__((packed)); } __attribute__((packed));
typedef struct TransportHeaderT xporthdr; typedef struct TransportHeaderT xporthdr;
typedef enum _E_NWPKT_IPFRAME_TYPE typedef enum _E_NWPKT_IPFRAME_TYPE
{ {
eNonIPPacket, eNonIPPacket,
eIPv4Packet, eIPv4Packet,
eIPv6Packet eIPv6Packet
}E_NWPKT_IPFRAME_TYPE; } E_NWPKT_IPFRAME_TYPE;
typedef enum _E_NWPKT_ETHFRAME_TYPE typedef enum _E_NWPKT_ETHFRAME_TYPE
{ {
...@@ -51,7 +47,7 @@ typedef struct _S_ETHCS_PKT_INFO ...@@ -51,7 +47,7 @@ typedef struct _S_ETHCS_PKT_INFO
E_NWPKT_ETHFRAME_TYPE eNwpktEthFrameType; E_NWPKT_ETHFRAME_TYPE eNwpktEthFrameType;
USHORT usEtherType; USHORT usEtherType;
UCHAR ucDSAP; UCHAR ucDSAP;
}S_ETHCS_PKT_INFO,*PS_ETHCS_PKT_INFO; } S_ETHCS_PKT_INFO, *PS_ETHCS_PKT_INFO;
typedef struct _ETH_CS_802_Q_FRAME typedef struct _ETH_CS_802_Q_FRAME
{ {
...@@ -68,7 +64,7 @@ typedef struct _ETH_CS_802_LLC_FRAME ...@@ -68,7 +64,7 @@ typedef struct _ETH_CS_802_LLC_FRAME
unsigned char DSAP; unsigned char DSAP;
unsigned char SSAP; unsigned char SSAP;
unsigned char Control; unsigned char Control;
}__attribute__((packed)) ETH_CS_802_LLC_FRAME; } __attribute__((packed)) ETH_CS_802_LLC_FRAME;
typedef struct _ETH_CS_802_LLC_SNAP_FRAME typedef struct _ETH_CS_802_LLC_SNAP_FRAME
{ {
...@@ -86,13 +82,13 @@ typedef struct _ETH_CS_ETH2_FRAME ...@@ -86,13 +82,13 @@ typedef struct _ETH_CS_ETH2_FRAME
} __attribute__((packed)) ETH_CS_ETH2_FRAME; } __attribute__((packed)) ETH_CS_ETH2_FRAME;
#define ETHERNET_FRAMETYPE_IPV4 ntohs(0x0800) #define ETHERNET_FRAMETYPE_IPV4 ntohs(0x0800)
#define ETHERNET_FRAMETYPE_IPV6 ntohs(0x86dd) #define ETHERNET_FRAMETYPE_IPV6 ntohs(0x86dd)
#define ETHERNET_FRAMETYPE_802QVLAN ntohs(0x8100) #define ETHERNET_FRAMETYPE_802QVLAN ntohs(0x8100)
//Per SF CS Specification Encodings //Per SF CS Specification Encodings
typedef enum _E_SERVICEFLOW_CS_SPEC_ typedef enum _E_SERVICEFLOW_CS_SPEC_
{ {
eCSSpecUnspecified =0, eCSSpecUnspecified = 0,
eCSPacketIPV4, eCSPacketIPV4,
eCSPacketIPV6, eCSPacketIPV6,
eCS802_3PacketEthernet, eCS802_3PacketEthernet,
...@@ -102,33 +98,26 @@ typedef enum _E_SERVICEFLOW_CS_SPEC_ ...@@ -102,33 +98,26 @@ typedef enum _E_SERVICEFLOW_CS_SPEC_
eCSPacketIPV4Over802_1QVLAN, eCSPacketIPV4Over802_1QVLAN,
eCSPacketIPV6Over802_1QVLAN, eCSPacketIPV6Over802_1QVLAN,
eCSPacketUnsupported eCSPacketUnsupported
}E_SERVICEFLOW_CS_SPEC; } E_SERVICEFLOW_CS_SPEC;
#define IP6_HEADER_LEN 40
#define IP_VERSION(byte) (((byte&0xF0)>>4))
#define IP6_HEADER_LEN 40
#define IP_VERSION(byte) (((byte&0xF0)>>4))
#define MAC_ADDRESS_SIZE 6 #define MAC_ADDRESS_SIZE 6
#define ETH_AND_IP_HEADER_LEN 14 + 20 #define ETH_AND_IP_HEADER_LEN 14 + 20
#define L4_SRC_PORT_LEN 2 #define L4_SRC_PORT_LEN 2
#define L4_DEST_PORT_LEN 2 #define L4_DEST_PORT_LEN 2
#define CTRL_PKT_LEN 8 + ETH_AND_IP_HEADER_LEN #define CTRL_PKT_LEN 8 + ETH_AND_IP_HEADER_LEN
#define ETH_ARP_FRAME 0x806 #define ETH_ARP_FRAME 0x806
#define ETH_IPV4_FRAME 0x800 #define ETH_IPV4_FRAME 0x800
#define ETH_IPV6_FRAME 0x86DD #define ETH_IPV6_FRAME 0x86DD
#define UDP 0x11 #define UDP 0x11
#define TCP 0x06 #define TCP 0x06
#define ARP_OP_REQUEST 0x01 #define ARP_OP_REQUEST 0x01
#define ARP_OP_REPLY 0x02 #define ARP_OP_REPLY 0x02
#define ARP_PKT_SIZE 60 #define ARP_PKT_SIZE 60
// This is the format for the TCP packet header // This is the format for the TCP packet header
typedef struct _TCP_HEADER typedef struct _TCP_HEADER
...@@ -138,14 +127,14 @@ typedef struct _TCP_HEADER ...@@ -138,14 +127,14 @@ typedef struct _TCP_HEADER
ULONG ulSeqNumber; ULONG ulSeqNumber;
ULONG ulAckNumber; ULONG ulAckNumber;
UCHAR HeaderLength; UCHAR HeaderLength;
UCHAR ucFlags; UCHAR ucFlags;
USHORT usWindowsSize; USHORT usWindowsSize;
USHORT usChkSum; USHORT usChkSum;
USHORT usUrgetPtr; USHORT usUrgetPtr;
} TCP_HEADER,*PTCP_HEADER; } TCP_HEADER, *PTCP_HEADER;
#define TCP_HEADER_LEN sizeof(TCP_HEADER)
#define TCP_ACK 0x10 //Bit 4 in tcpflags field.
#define GET_TCP_HEADER_LEN(byte) ((byte&0xF0)>>4)
#define TCP_HEADER_LEN sizeof(TCP_HEADER)
#define TCP_ACK 0x10 //Bit 4 in tcpflags field.
#define GET_TCP_HEADER_LEN(byte) ((byte&0xF0)>>4)
#endif //__PROTOCOL_H__ #endif //__PROTOCOL_H__
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment