linklayerprotocols/ethernetnif/INC/netdefs.h
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 2004-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     2 // All rights reserved.
       
     3 // This component and the accompanying materials are made available
       
     4 // under the terms of "Eclipse Public License v1.0"
       
     5 // which accompanies this distribution, and is available
       
     6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     7 //
       
     8 // Initial Contributors:
       
     9 // Nokia Corporation - initial contribution.
       
    10 //
       
    11 // Contributors:
       
    12 //
       
    13 // Description:
       
    14 // Network definitions
       
    15 // Address size of IP4
       
    16 // 
       
    17 //
       
    18 
       
    19 /**
       
    20  @file
       
    21  @internalComponent 
       
    22 */
       
    23  
       
    24 const TInt KProtocolAddressSize=4; 
       
    25 const TInt KNetworkAddressSize=6;	//< Address size for Ether MAC
       
    26 const TInt KMacDestAddressOffset=0;
       
    27 const TInt KMacSrcAddressOffset=6;
       
    28 const TInt KPacketFrameTypeOffset=12;
       
    29 const TInt KLLCPacketFrameTypeOffset=20;
       
    30 const TInt KARPFrameTypeHighByte=0x08;
       
    31 const TInt KARPFrameTypeLowByte=0x06;
       
    32 const TInt KIPFrameTypeHighByte=0x08;
       
    33 const TInt KIPFrameTypeLowByte=0x00;
       
    34 const TInt KARPMacSize=14;			//< Mac Header Size
       
    35 const TInt KARPLLCHeaderSize=22;	//< 802.2 LLC Header Size
       
    36 const TInt KARPRequestSize=28;		//< ARP Request Size
       
    37 const TInt KTotalARPRequestSize=KARPMacSize+KARPRequestSize;
       
    38 const TInt KARPLLCPacketLen=60;		//< 802.2 ARP Packet Length including PAD bytes
       
    39 const TInt KNumARPPackBytesLLC=10;
       
    40 const TInt KNumARPPackBytesEther=18;
       
    41 const TInt KARPHardTypeOffset=0;	//< ARP Packet Offsets - from start of data not including MAC or LLC headers
       
    42 const TInt KARPProtTypeOffset=2;
       
    43 const TInt KARPHardSizeOffset=4;
       
    44 const TInt KARPProtSizeOffset=5;
       
    45 const TInt KARPOperationOffset=6;
       
    46 const TInt KARPOperationOffsetLowByte=7;
       
    47 const TInt KARPSenderEtherAddrOffset=8;
       
    48 const TInt KARPSenderIPAddrOffset=14;
       
    49 const TInt KARPTargetEtherAddrOffset=18;
       
    50 const TInt KARPTargetIPAddrOffset=24;
       
    51 const TInt KIpSourceAddrOffset=12;	//< IP header offsets (from start of IP Header)
       
    52 const TInt KIpDestAddrOffset=16;
       
    53 const TInt KIpOptionsAddrOffset=20;
       
    54 const TInt KARPRequest=1;			//< ARP Packet Types
       
    55 const TInt KARPReply=2;
       
    56 //const TUint8 KTestSrcIpAddr[4]={194,200,129,254};
       
    57 const TUint8 KTestSrcIpAddr[4]={194,129,1,247};