linklayerprotocols/pppnif/INC/PPPSOCK.INL
changeset 0 af10295192d8
equal deleted inserted replaced
-1:000000000000 0:af10295192d8
       
     1 // Copyright (c) 1997-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 // PPP Socket address - used by link protocols
       
    15 // 
       
    16 //
       
    17 
       
    18 /**
       
    19  @file
       
    20  @internalComponent 
       
    21 */
       
    22 
       
    23 inline TPppAddr& TPppAddr::Cast(const TSockAddr& aAddr)
       
    24 	{ return *((TPppAddr*)&aAddr); }
       
    25 
       
    26 inline TPppAddr& TPppAddr::Cast(const TSockAddr* aAddr)
       
    27 	{ return *((TPppAddr*)aAddr); }
       
    28 
       
    29 inline SPppLinkAddr* TPppAddr::InfoPtr() const
       
    30 	{ return (SPppLinkAddr*)UserPtr(); }
       
    31 
       
    32 inline void TPppAddr::SetAddress(TUint aAddress)
       
    33 	{ InfoPtr()->iAddress = aAddress; }
       
    34 
       
    35 inline void TPppAddr::SetControl(TUint aControl)
       
    36 	{ InfoPtr()->iControl = aControl; }
       
    37 
       
    38 inline void TPppAddr::SetProtocol(TUint aProtocol)
       
    39 	{ InfoPtr()->iProtocol = aProtocol; }
       
    40 
       
    41 inline void TPppAddr::SetPhase(TPppPhase aPhase)
       
    42 	{ InfoPtr()->iPhase = aPhase; }
       
    43 
       
    44 inline void TPppAddr::SetCRCError(TBool anError)
       
    45 	{ InfoPtr()->iCRCError = anError;}
       
    46 inline TBool TPppAddr::CRCError()
       
    47 	{ return InfoPtr()->iCRCError; }
       
    48 
       
    49 inline TUint TPppAddr::GetAddress()
       
    50 	{ return InfoPtr()->iAddress; }
       
    51 
       
    52 inline TUint TPppAddr::GetControl()
       
    53 	{ return InfoPtr()->iControl; }
       
    54 
       
    55 inline TUint TPppAddr::GetProtocol()
       
    56 	{ return InfoPtr()->iProtocol; }
       
    57 
       
    58 inline TPppPhase TPppAddr::GetPhase()
       
    59 	{ return InfoPtr()->iPhase; }
       
    60