epoc32/include/icmp6_hdr.h
author William Roberts <williamr@symbian.org>
Wed, 31 Mar 2010 12:33:34 +0100
branchSymbian3
changeset 4 837f303aceeb
parent 2 2fe1408b6811
permissions -rw-r--r--
Current Symbian^3 public API header files (from PDK 3.0.h)
This is the epoc32/include tree with the "platform" subtrees removed, and
all but a selected few mbg and rsg files removed.
     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 // icmp6_hdr.h - ICMPv6 header structure
    15 // This module defines the basic classes for accessing the header
    16 // structures within ICMPv6 packets.
    17 //
    18 
    19 
    20 
    21 /**
    22  @file icmp6_hdr.h
    23  @ingroup ip_packet_formats
    24  @publishedAll
    25  @released
    26 */
    27 
    28 #ifndef __ICMP6_HDR_H__
    29 #define __ICMP6_HDR_H__
    30 
    31 #include <e32def.h>
    32 #include "in_hdr.h"
    33 #include <in_sock.h> // IPv6 enhanced in_sock.h
    34 
    35 #ifdef SYMBIAN_TCPIPDHCP_UPDATE
    36 //RFC 5006 definitions
    37 #define RDNSSADDRSIZE 16
    38 #define RDNSSOPTION_HDRLENGTH 8
    39 #define RDNSS_MAX_ADDRESS 4 //4 DNS address shall be processed from RDNSS Option available in RA
    40 #endif //SYMBIAN_TCPIPDHCP_UPDATE
    41 
    42 /**
    43 * @addtogroup ip_packet_formats
    44 */
    45 //@{
    46 
    47 // TInet6HeaderICMP
    48 class TInet6HeaderICMP
    49 /**
    50 * ICMPv6 header common part layout.
    51 *
    52 * The basic ICMP header format only covers the common part (4 bytes)
    53 * and 4 bytes of the Message Body (can be accesses as "Parameter")
    54 @verbatim
    55 Extract from RFC-2462: General format of ICMP message
    56 
    57  0                   1                   2                   3
    58  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
    59 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    60 |     Type      |     Code      |          Checksum             |
    61 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
    62 |                                                               |
    63 +                         Message Body                          +
    64 |                                                               |
    65 @endverbatim
    66 * @publishedAll
    67 * @released
    68 */
    69 	{
    70 public:
    71 	inline TInt HeaderLength() const
    72 		/**
    73 		* Gets the header length.	
    74 		* 
    75 		* @note
    76 		*	This length is not the true length of the
    77 		*	ICMP header. This only covers the fixed part.
    78 		* 
    79 		* @return	Header length.
    80 		*/
    81 		{return 4;}
    82 	inline static TInt MinHeaderLength()
    83 		/**
    84 		* Gets the minimum header length.
    85 		* 
    86 		* @return	Minimum header length
    87 		*/
    88 		{return 4; }
    89 	inline static TInt MaxHeaderLength()
    90 		/**
    91 		* Gets the maximum header length.
    92 		* 
    93 		* @note
    94 		*	This length is not the true length of the
    95 		*	ICMP header. This only covers the fixed part.
    96 		* 
    97 		* @return	Maximum header length
    98 		*/
    99 		{return 4; }
   100 	inline TUint8 *EndPtr() const
   101 		/**
   102 		* Gets a pointer to the byte following the header.
   103 		* 
   104 		* @return
   105 		*	Pointer to the byte following the minimum
   106 		*	fixed header
   107 		*/
   108 		{return (TUint8 *)i + HeaderLength();}
   109 	//
   110 	// Access, get ICMP header field values from the packet
   111 	//
   112 	inline TUint8 Type() const
   113 		/**
   114 		* Gets the ICMPv6 type from the header.
   115 		* @return ICMPv6 type [0..255]
   116 		*/
   117 		{
   118 		return i[0];
   119 		}
   120 	inline TUint8 Code() const
   121 		/**
   122 		* Gets the ICMPv6 code from the header.
   123 		* @return ICMPv6 code [0..255]
   124 		*/
   125 		{
   126 		return i[1];
   127 		}
   128 	inline TInt Checksum() const
   129 		/**
   130 		* Gets the Checksum from the header.
   131 		* @return Header Checksum (TUint16 in NETWORK byte order)
   132 		*/
   133 		{
   134 		// Checksum is used in network byte order
   135 		return *((TUint16 *)&i[2]);
   136 		}
   137 	inline TUint32 Parameter() const
   138 		/**
   139 		* Gets the ICMPv6 Parameter.
   140 		*
   141 		* Accesses the first 4 bytes of ICMP message body, and assumes
   142 		* they form a 32 bit integer in network byte order. Returns
   143 		* this integer in host order.
   144 		*
   145 		* @return ICMPv6 Parameter (as an integer)
   146 		*/
   147 		{
   148 		return (i[4] << 24) | (i[5] << 16) | (i[6] << 8) | i[7];
   149 		}
   150 	//
   151 	// Build, set IP header field values into the packet
   152 	//
   153 	inline void SetType(TUint8 aType)
   154 		/**
   155 		* Sets the ICMPv6 type.
   156 		* @param aType ICMPv6 type [0..255]
   157 		*/
   158 		{
   159 		i[0] = aType;
   160 		}
   161 	inline void SetCode(TUint8 aCode)
   162 		/**
   163 		* Sets the ICMPv6 code.
   164 		* @param aCode ICMPv6 code [0..255]
   165 		*/
   166 		{
   167 		i[1] = aCode;
   168 		}
   169 	inline void SetChecksum(TInt aSum)
   170 		/**
   171 		* Sets the Checksum.
   172 		*
   173 		* @param aSum
   174 		*	The Checksum [0..65535] (16 least significant bits
   175 		*	stored as is (assumed to be in NETWORK byte order).					
   176 		*/
   177 		{
   178 		*((TUint16 *)&i[2]) = (TUint16)aSum;
   179 		}
   180 	inline void SetParameter(TUint32 aValue)
   181 		/**
   182 		* Sets the ICMPv6 Parameter.
   183 		*
   184 		* The value is converted into network byte order and
   185 		* stored as the first 4 bytes of the ICMP message body.
   186 		*
   187 		* @param aValue
   188 		*	The parameter.
   189 		*/
   190 		{
   191 		i[7] = (TUint8)aValue;
   192 		i[6] = (TUint8)(aValue >> 8);
   193 		i[5] = (TUint8)(aValue >> 16);
   194 		i[4] = (TUint8)(aValue >> 24);
   195 		}
   196 
   197 protected:
   198 	union
   199 		{
   200 		TUint8 i[8];
   201 		TUint32 iAlign;	// A dummy member to force the 4 byte alignment
   202 		};
   203 	};
   204 
   205 
   206 //
   207 // TInet6HeaderICMP_Echo
   208 //
   209 class TInet6HeaderICMP_Echo : public TInet6HeaderICMP
   210 /**
   211 * ICMPv6 Echo Request and Echo Reply layout.
   212 *
   213 * Describes the ICMP Echo Request and Replay layout. The space for
   214 * Identifier and Sequence is already covered by the base class.
   215 *
   216 @verbatim
   217 RFC-2463:
   218 
   219  0                   1                   2                   3
   220  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   221 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   222 |     Type      |     Code      |          Checksum             |
   223 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   224 |           Identifier          |        Sequence Number        |
   225 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   226 |     Data ...
   227 +-+-+-+-+-
   228 @endverbatim
   229 @publishedAll
   230 @released
   231 */
   232 	{
   233 public:
   234 	//
   235 	// General
   236 	//
   237 	inline TInt HeaderLength() const
   238 		/**
   239 		* Gets the header length.
   240 		* @return The length
   241 		*/
   242 		{return 8;}
   243 	inline static TInt MinHeaderLength()
   244 		/**
   245 		* Gets the minimum header length.	
   246 		* @return The length
   247 		*/
   248 		{return 8; }
   249 	inline static TInt MaxHeaderLength()
   250 		/**
   251 		* Gets the maximum header length.	
   252 		* @return The length
   253 		*/
   254 		{return 8; }
   255 
   256 	//
   257 	// Access, get ICMP header field values from the packet
   258 	//
   259 	inline TInt Identifier() const
   260 		/**
   261 		* Gets the Idenfifier
   262 		* @return The Identifier
   263 		*/
   264 		{
   265 		return (i[4] << 8) + i[5];
   266 		}
   267 	inline TInt Sequence() const
   268 		/**
   269 		* Gets the Sequence Number
   270 		* @return The number
   271 		*/
   272 		{
   273 		return (i[6] << 8) + i[7];
   274 		}
   275 	//
   276 	// Build, set IP header field values into the packet
   277 	//
   278 	inline void SetIdentifier(TUint16 aIdentifier)
   279 		/**
   280 		* Sets the Idenfifier
   281 		* @param aIdentifier The Identifier
   282 		*/
   283 		{
   284 		i[4] = (TUint8)(aIdentifier >> 8);
   285 		i[5] = (TUint8)aIdentifier;
   286 		}
   287 	inline void SetSequence(TUint16 aSequence)
   288 		/**
   289 		* Sets the Sequence Number
   290 		* @param aSequence The number
   291 		*/
   292 		{
   293 		i[6] = (TUint8)(aSequence >> 8);
   294 		i[7] = (TUint8)aSequence;
   295 		}
   296 private:
   297 	};
   298 
   299 
   300 class TInet6HeaderICMP_RouterSol: public TInet6HeaderICMP
   301 /**
   302 * ICMPv6 Router Solicitation layout.
   303 *
   304 @verbatim
   305 Router Solicitation Message Format (from RFC-2461)
   306 
   307  0                   1                   2                   3
   308  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   309 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   310 |     Type      |     Code      |          Checksum             |
   311 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   312 |                            Reserved                           |
   313 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   314 |   Options ...
   315 +-+-+-+-+-+-+-+-+-+-+-+-
   316 @endverbatim
   317 * Aside from the fields provided by the base class, there is nothing
   318 * else here.
   319 *
   320 * Valid options:
   321 *
   322 * - #KInet6OptionICMP_SourceLink
   323 *
   324 * @publishedAll
   325 * @released
   326 */
   327 	{
   328 public:
   329 	inline static TInt MinHeaderLength() {return 8; }
   330 	inline static TInt MaxHeaderLength() {return 8; }
   331 	inline TInt HeaderLength() const {return 8;}
   332 	};
   333 
   334 // Router Advertisement Message Format from RFC-2461
   335 class TInet6HeaderICMP_RouterAdv : public TInet6HeaderICMP
   336 /**
   337 * ICMPv6 Router Advertisement layout.
   338 *
   339 * (Neighbour Discovery for IP version 6)
   340 * (+ Home Agent flag from draft-ietf-mobileip-ipv6-08)
   341 @verbatim
   342 Type=134, Code=0
   343 
   344  0                   1                   2                   3
   345  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   346 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   347 |     Type      |     Code      |          Checksum             |
   348 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   349 | Cur Hop Limit |M|O|H|Prf|Rsrvd|       Router Lifetime         |
   350 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   351 |                         Reachable Time                        |
   352 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   353 |                          Retrans Timer                        |
   354 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   355 |   Options ...
   356 +-+-+-+-+-+-+-+-+-+-+-+-
   357 @endverbatim
   358 *
   359 * @note
   360 *	Above is longer thant what is declared in the base class
   361 *	i-member. The user must verify the sufficient length of
   362 *	the packet, when using this.
   363 *
   364 * Valid options:
   365 *
   366 * - #KInet6OptionICMP_SourceLink
   367 * - #KInet6OptionICMP_Mtu
   368 * - #KInet6OptionICMP_Prefix
   369 * - #KInet6OptionICMP_RouteInformation (draft)
   370 *
   371 * @publishedAll
   372 * @released
   373 */
   374 	{
   375 public:
   376 	//
   377 	// General
   378 	//
   379 	inline static TInt MinHeaderLength() {return 16; }
   380 	inline static TInt MaxHeaderLength() {return 16; }
   381 	inline TInt HeaderLength() const {return 16;}
   382 	//
   383 	// Access, get ICMP header field values from the packet
   384 	//
   385 	inline TInt CurHopLimit() const
   386 		/**
   387 		* Gets Cur Hop Limit.
   388 		* @return Hop Limit
   389 		*/
   390 		{
   391 		return i[4];
   392 		}
   393 	inline TInt Flags() const
   394 		/**
   395 		* Gets flags byte
   396 		* @return Flags (M, O, H, Prf and Rsrvd)
   397 		*/
   398 		{
   399 		return i[5];		// M + O + Reserved as one unit
   400 		}
   401 	inline TInt M() const
   402 		/** Gets Managed Address Configuration (M) flag */
   403 		{
   404 		return i[5] & 0x80;
   405 		}
   406 	inline TInt O() const
   407 		/** Gets Other Address Configuartion (O) flag */
   408 		{
   409 		return i[5] & 0x40;
   410 		}
   411 	inline TInt H() const
   412 		/** Gets Home Agent Configuration (H) flag */
   413 		{
   414 		return i[5] & 0x20;
   415 		}
   416 #if 1
   417 	inline TInt Prf() const
   418 		/**
   419 		* Gets default route preference.
   420 		*
   421 		* Experimental: draft-draves-ipngwg-router-selection-01.txt
   422 		* Default Router Preferences and More-Specific Routes
   423 		*/
   424 		{
   425 		return (i[5] >> 3) & 0x3;	// should be treated as 2bit signed int
   426 		}
   427 #endif
   428 	inline TInt RouterLifetime() const
   429 		/**
   430 		* Gets the lifetime of the defaul route.
   431 		*
   432 		* If non-zero, specifies how long (in seconds) this
   433 		* router is willing to act as a default router.
   434 		*
   435 		* @return The life time of the default route.
   436 		*
   437 		* @note
   438 		*	This is badly named. The parameter controls
   439 		*	only the default route processing. The value
   440 		*	ZERO does not mean that the sender is not a
   441 		*	router.
   442 		*/
   443 		{
   444 		return (i[6] << 8) + i[7];
   445 		}
   446 	inline TUint32 ReachableTime() const
   447 		/**
   448 		* Gets the value of reachable timer.
   449 		*/
   450 		{
   451 		// coverity[overrun-local]
   452 		return (i[8] << 24) | (i[9] << 16) | (i[10] << 8) | i[11];
   453 		}
   454 	inline TUint32 RetransTimer() const
   455 		/**
   456 		* Gets the value of retransmit timer.
   457 		*/
   458 		{
   459 		// coverity[overrun-local]
   460 		return (i[12] << 24) | (i[13] << 16) | (i[14] << 8) | i[15];
   461 		}
   462 	//
   463 	// Build, set IP header field values into the packet
   464 	//
   465 	inline void SetCurHopLimit(TInt aLimit)
   466 		/**
   467 		* Sets the Cur Hoplimit.
   468 		* @param	aLimit	The Hoplimit [0..255]
   469 		*/
   470 		{
   471 		i[4] = (TUint8)aLimit;
   472 		}
   473 	inline void SetFlags(TInt aFlags)
   474 		/**
   475 		* Sets the flags.
   476 		* @param	aFlags	The flags bits [0..255].
   477 		*/
   478 		{
   479 		i[5] = (TUint8)aFlags;
   480 		}
   481 	inline void SetRouterLifetime(TInt aTime)
   482 		/**
   483 		* Sets the lifetime of the default route.
   484 		* @param aTime The lifetime.
   485 		*/
   486 		{
   487 		i[7] = (TUint8)aTime;
   488 		i[6] = (TUint8)(aTime >> 8);
   489 		}
   490 	inline void SetReachableTime(TUint32 aTime)
   491 		/**
   492 		* Sets the value of reachable timer
   493 		* @param aTime The timer value
   494 		*/
   495 		{
   496 		// coverity[overrun-local]
   497 		i[11] = (TUint8)aTime;
   498 		// coverity[overrun-local]
   499 		i[10] = (TUint8)(aTime >> 8);
   500 		// coverity[overrun-local]
   501 		i[9] = (TUint8)(aTime >> 16);
   502 		// coverity[overrun-local]
   503 		i[8] = (TUint8)(aTime >> 24);
   504 		}
   505 	inline void SetRetransTimer(TUint32 aTimer)
   506 		/**
   507 		* Sets the value of the retransmit timer
   508 		* @param aTimer The timer value
   509 		*/
   510 		{
   511 		// coverity[overrun-local]
   512 		i[15] = (TUint8)aTimer;
   513 		// coverity[overrun-local]
   514 		i[14] = (TUint8)(aTimer >> 8);
   515 		// coverity[overrun-local]
   516 		i[13] = (TUint8)(aTimer >> 16);
   517 		// coverity[overrun-local]
   518 		i[12] = (TUint8)(aTimer >> 24);
   519 		}
   520 
   521 private:
   522 	};
   523 
   524 class TInet6HeaderICMP_NeighborSol : public TInet6HeaderICMP
   525 /**
   526 * ICMPv6 Neighbour Solicitation layout.
   527 @verbatim
   528 Neigbour Solicitation Message Format from RFC-2461
   529 
   530  0                   1                   2                   3
   531  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   532 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   533 |     Type      |     Code      |          Checksum             |
   534 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   535 |                           Reserved                            |
   536 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   537 |                                                               |
   538 +                                                               +
   539 |                                                               |
   540 +                       Target Address                          +
   541 |                                                               |
   542 +                                                               +
   543 |                                                               |
   544 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   545 |   Options ...
   546 +-+-+-+-+-+-+-+-+-+-+-+-
   547 @endverbatim
   548 *
   549 * @note
   550 *	Above is longer thant what is declared in the base class
   551 *	i-member. The user must verify the sufficient length of
   552 *	the packet, when using this.
   553 *
   554 * Valid options:
   555 *
   556 * - #KInet6OptionICMP_SourceLink
   557 *
   558 * @publishedAll
   559 * @released
   560 */
   561 	{
   562 public:
   563 	//
   564 	// General
   565 	//
   566 	inline static TInt MinHeaderLength() {return 24; }
   567 	inline static TInt MaxHeaderLength() {return 24; }
   568 	inline TInt HeaderLength() const {return 24;}
   569 	inline TIp6Addr &Target() const
   570 		/**
   571 		* Gets the Target Address.
   572 		*
   573 		* @return The target address (reference).
   574 		*/
   575 		{
   576 		return (TIp6Addr &)i[8];
   577 		}
   578 private:
   579 	};
   580 
   581 
   582 class TInet6HeaderICMP_NeighborAdv : public TInet6HeaderICMP
   583 /**
   584 * ICMPv6 Neighbour Advertisement layout.
   585 @verbatim
   586 Neighbor Advertisement Message Format (from RFC-2461)
   587 
   588  0                   1                   2                   3
   589  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   590 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   591 |     Type      |     Code      |          Checksum             |
   592 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   593 |R|S|O|                     Reserved                            |
   594 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   595 |                                                               |
   596 +                                                               +
   597 |                                                               |
   598 +                       Target Address                          +
   599 |                                                               |
   600 +                                                               +
   601 |                                                               |
   602 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   603 |   Options ...
   604 +-+-+-+-+-+-+-+-+-+-+-+-
   605 @endverbatim
   606 * @note
   607 *	Above is longer thant what is declared in the base class
   608 *	i-member. The user must verify the sufficient length of
   609 *	the packet, when using this.
   610 *
   611 * Valid options:
   612 *
   613 * - #KInet6OptionICMP_TargetLink
   614 *
   615 * @publishedAll
   616 * @released
   617 */
   618 	{
   619 public:
   620 	//
   621 	// General
   622 	//
   623 	inline static TInt MinHeaderLength() {return 24; }
   624 	inline static TInt MaxHeaderLength() {return 24; }
   625 	inline TInt HeaderLength() const {return 24;}
   626 
   627 	//
   628 	// Set and Access the Target Address
   629 	//
   630 	inline TIp6Addr &Target() const
   631 		/**
   632 		* Gets the Target Address.
   633 		*
   634 		* @return The target address (reference).
   635 		*/
   636 		{
   637 		return (TIp6Addr &)i[8];
   638 		}
   639 
   640 	inline TInt R()
   641 		{
   642 		return 0x80 & i[4];
   643 		}
   644 	inline TInt S()
   645 		{
   646 		return 0x40 & i[4];
   647 		}
   648 	inline TInt O()
   649 		{
   650 		return 0x20 & i[4];
   651 		}
   652 	inline void SetR(TInt aValue)
   653 		{
   654 		if (aValue) i[4] |= 0x80; else i[4] &= ~0x80;
   655 		}
   656 	inline void SetS(TInt aValue)
   657 		{
   658 		if (aValue) i[4] |= 0x40; else i[4] &= ~0x40;
   659 		}
   660 	inline void SetO(TInt aValue)
   661 		{
   662 		if (aValue) i[4] |= 0x20; else i[4] &= ~0x20;
   663 		}
   664 
   665 	};
   666 
   667 
   668 class TInet6HeaderICMP_Redirect : public TInet6HeaderICMP
   669 /**
   670 * ICMPv6 Redirect layout.
   671 @verbatim
   672 Redirect Message Format (RFC-2461)
   673 
   674  0                   1                   2                   3
   675  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   676 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   677 |     Type      |     Code      |          Checksum             |
   678 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   679 |                           Reserved                            |
   680 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   681 |                                                               |
   682 +                                                               +
   683 |                                                               |
   684 +                       Target Address                          +
   685 |                                                               |
   686 +                                                               +
   687 |                                                               |
   688 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   689 |                                                               |
   690 +                                                               +
   691 |                                                               |
   692 +                     Destination Address                       +
   693 |                                                               |
   694 +                                                               +
   695 |                                                               |
   696 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   697 |   Options ...
   698 +-+-+-+-+-+-+-+-+-+-+-+-
   699 
   700 @endverbatim
   701 * @note
   702 *	Above is longer thant what is declared in the base class
   703 *	i-member. The user must verify the sufficient length of
   704 *	the packet, when using this.
   705 *
   706 * Valid options:
   707 *
   708 * - #KInet6OptionICMP_TargetLink
   709 * - #KInet6OptionICMP_Redirect
   710 *
   711 * @publishedAll
   712 * @released
   713 */
   714 	{
   715 public:
   716 	//
   717 	// General
   718 	//
   719 	inline static TInt MinHeaderLength() {return 40; }
   720 	inline static TInt MaxHeaderLength() {return 40; }
   721 	inline TInt HeaderLength() const {return 40;}
   722 
   723 	inline TIp6Addr &Target() const
   724 		/**
   725 		* Gets the Target Address.
   726 		*
   727 		* @return The target address (reference).
   728 		*/
   729 		{
   730 		return (TIp6Addr &)i[8];
   731 		}
   732 	inline TIp6Addr &Destination() const
   733 		/**
   734 		* Gets the Destination Address.
   735 		*
   736 		* @return The destination address (reference).
   737 		*/
   738 		{
   739 		return (TIp6Addr &)i[24];
   740 		}
   741 	};
   742 
   743 
   744 class TInet6OptionICMP_LinkLayer
   745 /**
   746 * ICMPv6 Link-layer Address layout.
   747 @verbatim
   748 Source/Target Link-layer Address Option (RFC-2461)
   749 
   750  0                   1                   2                   3
   751  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   752 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   753 |     Type      |    Length     |    Link-Layer Address ...
   754 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   755 @endverbatim
   756 * @publishedAll
   757 * @released
   758 */
   759 	{
   760 public:
   761 	inline static TInt MinHeaderLength() {return 8; }
   762 	inline static TInt MaxHeaderLength() {return 8; }	// Not very useful
   763 	inline TInt HeaderLength() const {return Length() * 8; }
   764 	//
   765 	// Access
   766 	//
   767 	inline TInt Type() const
   768 		{
   769 		return i[0];
   770 		}
   771 	inline TInt Length() const
   772 		{
   773 		return i[1];
   774 		}
   775 	//
   776 	// Access and Set
   777 	//
   778 	inline TPtr8 Address() const
   779 		{
   780 		return TPtr8((TUint8 *)&i[2], i[1] * 8 - 2, i[1] * 8 - 2);
   781 		}
   782 	//
   783 	// Construct methods
   784 	//
   785 	inline void SetType(TInt aType)
   786 		{
   787 		i[0] = (TUint8)aType;
   788 		}
   789 	inline void SetLength(TInt aLength)
   790 		{
   791 		i[1] = (TUint8)aLength;
   792 		}
   793 private:
   794 	union
   795 		{
   796 		TUint8 i[8];
   797 		TUint32 iAlign;	// A dummy member to force the 4 byte alignment
   798 		};
   799 	};
   800 
   801 
   802 class TInet6OptionICMP_Prefix
   803 /**
   804 * ICMPv6 Prefix Infotmation Option.
   805 @verbatim
   806 Prefix Information Option (RFC-2461)
   807 (+ Router Address flag from draft-ietf-mobileip-ipv6-08)
   808  0                   1                   2                   3
   809  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   810 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   811 |     Type      |    Length     | Prefix Length |L|A|R| Rsrvd1  |
   812 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   813 |                         Valid Lifetime                        |
   814 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   815 |                       Preferred Lifetime                      |
   816 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   817 |                           Reserved2                           |
   818 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   819 |                                                               |
   820 +                                                               +
   821 |                                                               |
   822 +                            Prefix                             +
   823 |                                                               |
   824 +                                                               +
   825 |                                                               |
   826 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   827 
   828 @endverbatim
   829 * @publishedAll
   830 * @released
   831 */
   832 	{
   833 public:
   834 	inline static TInt MinHeaderLength() {return 4*8; }
   835 	inline static TInt MaxHeaderLength() {return 4*8; }	// Not very useful
   836 	inline TInt HeaderLength() const {return 4*8; }
   837 
   838 	inline TInt Type() const
   839 		{
   840 		return i[0];
   841 		}
   842 	inline TInt Length() const
   843 		{
   844 		return i[1];
   845 		}
   846 	inline TInt PrefixLength() const
   847 		{
   848 		return i[2];	// 0..128
   849 		}
   850 	inline TInt LFlag() const
   851 		{
   852 		return i[3] & 0x80;
   853 		}
   854 	inline TInt AFlag() const
   855 		{
   856 		return i[3] & 0x40;
   857 		}
   858 	inline TInt RFlag() const
   859 		{
   860 		return i[3] & 0x20;
   861 		}
   862 	inline TUint32 ValidLifetime() const
   863 		{
   864 		return (i[4] << 24) | (i[5] << 16) | (i[6] << 8) | i[7];
   865 		}
   866 	inline TUint32 PreferredLifetime() const
   867 		{
   868 		return (i[8] << 24) | (i[9] << 16) | (i[10] << 8) | i[11];
   869 		}
   870 	//
   871 	//
   872 	inline TIp6Addr &Prefix() const
   873 		{
   874 		return (TIp6Addr &)i[16];
   875 		}
   876 	//
   877 	// Construct methods
   878 	//
   879 	inline void SetType(TInt aType)
   880 		{
   881 		i[0] = (TUint8)aType;
   882 		}
   883 	inline void SetLength(TInt aLength)
   884 		{
   885 		i[1] = (TUint8)aLength;
   886 		}
   887 	inline void SetPrefixLength(TInt aLength)
   888 		{
   889 		i[2] = (TUint8)aLength;
   890 		}
   891 	inline void SetFlags(TInt aFlags)
   892 		{
   893 		i[3] = (TUint8)aFlags;
   894 		}
   895 	inline void SetValidLifetime(TUint32 aTime)
   896 		{
   897 		i[7] = (TUint8)aTime;
   898 		i[6] = (TUint8)(aTime >> 8);
   899 		i[5] = (TUint8)(aTime >> 16);
   900 		i[4] = (TUint8)(aTime >> 24);
   901 		}
   902 	inline void SetPreferredLifetime(TUint32 aTime)
   903 		{
   904 		i[11] = (TUint8)aTime;
   905 		i[10] = (TUint8)(aTime >> 8);
   906 		i[9] = (TUint8)(aTime >> 16);
   907 		i[8] = (TUint8)(aTime >> 24);
   908 		}
   909 	inline void SetReserved2(TUint32 aFiller)
   910 		{
   911 		i[15] = (TUint8)aFiller;
   912 		i[14] = (TUint8)(aFiller >> 8);
   913 		i[13] = (TUint8)(aFiller >> 16);
   914 		i[12] = (TUint8)(aFiller >> 24);
   915 		}
   916 
   917 
   918 private:
   919 	union
   920 		{
   921 		TUint8 i[4*8];
   922 		TUint32 iAlign;	// A dummy member to force the 4 byte alignment
   923 		};
   924 	};
   925 
   926 
   927 class TInet6OptionICMP_Mtu
   928 /**
   929 * ICMPv6 MTU Option.
   930 @verbatim
   931 MTU Option (RFC-2461)
   932 
   933  0                   1                   2                   3
   934  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
   935 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   936 |     Type      |    Length     |           Reserved            |
   937 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   938 |                              MTU                              |
   939 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
   940 @endverbatim
   941 * @publishedAll
   942 * @released
   943 */
   944 	{
   945 public:
   946 	inline static TInt MinHeaderLength() {return 8; }
   947 	inline static TInt MaxHeaderLength() {return 8; }	// Not very useful
   948 	inline TInt HeaderLength() const {return 8; }
   949 
   950 	inline TInt Type() const
   951 		{
   952 		return i[0];
   953 		}
   954 	inline TInt Length() const
   955 		{
   956 		return i[1];
   957 		}
   958 	inline TInt Mtu() const
   959 		{
   960 		return (i[4] << 24) | (i[5] << 16) | (i[6] << 8) | i[7];
   961 		}
   962 	//
   963 	// Construct methods
   964 	//
   965 	inline void SetType(TInt aType)
   966 		{
   967 		i[0] = (TUint8)aType;
   968 		}
   969 	inline void SetLength(TInt aLength)
   970 		{
   971 		i[1] = (TUint8)aLength;
   972 		// Silently ZERO the reserved bits... not too nice --- msa
   973 		i[2] = 0;
   974 		i[3] = 0;
   975 		}
   976 	inline void SetMtu(TUint32 aMtu)
   977 		{
   978 		i[7] = (TUint8)aMtu;
   979 		i[6] = (TUint8)(aMtu >> 8);
   980 		i[5] = (TUint8)(aMtu >> 16);
   981 		i[4] = (TUint8)(aMtu >> 24);
   982 		}
   983 private:
   984 	TUint8 i[8];
   985 	};
   986 
   987 
   988 #if 1
   989 class TInet6OptionICMP_RouteInformation
   990 // Route Information Option 
   991 // Experimental: draft-draves-ipngwg-router-selection-01.txt
   992 /**
   993 *  ICMPv6 Route Information Option.
   994 @verbatim
   995 Default Router Preferences and More-Specific Routes
   996 
   997  0                   1                   2                   3 
   998  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 
   999 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  1000 |     Type      |    Length     | Prefix Length |Resvd|Prf|Resvd| 
  1001 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  1002 |                        Route Lifetime                         | 
  1003 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  1004 |                                                               | 
  1005 +                                                               + 
  1006 |                                                               | 
  1007 +                            Prefix                             + 
  1008 |                                                               | 
  1009 +                                                               + 
  1010 |                                                               | 
  1011 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ 
  1012 @endverbatim
  1013 * @publishedAll
  1014 * @released
  1015 */
  1016 	{
  1017 public:
  1018 	inline static TInt MinHeaderLength() {return 8; }
  1019 	inline static TInt MaxHeaderLength() {return 3*8; }
  1020 	inline TInt HeaderLength() const {return Length()*8; }
  1021 
  1022 	inline TInt Type() const
  1023 		{
  1024 		return i[0];
  1025 		}
  1026 	inline TInt Length() const
  1027 		{
  1028 		return i[1];
  1029 		}
  1030 	inline TInt PrefixLength() const
  1031 		{
  1032 		return i[2];	// 0..128
  1033 		}
  1034 	inline TInt Prf() const
  1035 		{
  1036 		return (i[3] >> 3) & 0x3;	// should be treated as 2bit signed int
  1037 		}
  1038 	inline TUint32 RouteLifetime() const
  1039 		{
  1040 		return (i[4] << 24) | (i[5] << 16) | (i[6] << 8) | i[7];
  1041 		}
  1042 	//
  1043 	// *WARNING* The "Prefix" returns a raw reference to the beginning
  1044 	// of the prefix field in the option structure. HOWEVER, the option
  1045 	// field can be shorter than 128 bits! If used to allocate space,
  1046 	// the maximum is allocated and the method is safe, but that is not
  1047 	// true if header is mapped directly to the received packet! -- msa
  1048 	inline TIp6Addr &Prefix() const
  1049 		{
  1050 		return (TIp6Addr &)i[8];
  1051 		}
  1052 	//
  1053 	// Construct methods
  1054 	//
  1055 	inline void SetType(TInt aType)
  1056 		{
  1057 		i[0] = (TUint8)aType;
  1058 		}
  1059 	inline void SetLength(TInt aLength)
  1060 		{
  1061 		i[1] = (TUint8)aLength;
  1062 		}
  1063 	inline void SetPrefixLength(TInt aLength)
  1064 		{
  1065 		i[2] = (TUint8)aLength;
  1066 		}
  1067 	inline void SetPrefixLifetime(TUint32 aTime)
  1068 		{
  1069 		i[7] = (TUint8)aTime;
  1070 		i[6] = (TUint8)(aTime >> 8);
  1071 		i[5] = (TUint8)(aTime >> 16);
  1072 		i[4] = (TUint8)(aTime >> 24);
  1073 		}
  1074 
  1075 private:
  1076 	union
  1077 		{
  1078 		TUint8 i[3*8];	// The space allocated for MAX LENGTH
  1079 		TUint32 iAlign;	// A dummy member to force the 4 byte alignment
  1080 		};
  1081 	};
  1082 
  1083 class TInet6OptionICMP_DnsInformation
  1084 /**
  1085 *  ICMPv6 Recursive DNS Server Option.
  1086 * IPv6 DNS Configuration based on Router Advertisement
  1087 *
  1088 * Experimental: draft-jeong-dnsop-ipv6-discovery-03.txt
  1089 @verbatim
  1090 Recursive DNS Server Option
  1091 
  1092  0                   1                   2                   3
  1093  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1094 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1095 |     Type      |     Length    |  Pref |        Reserved       |
  1096 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1097 |                           Lifetime                            |
  1098 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1099 |                                                               |
  1100 :                     IPv6 Address of RDNSS                     :
  1101 |                                                               |
  1102 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1103      
  1104 @endverbatim
  1105 * @publishedAll
  1106 * @released
  1107 */
  1108 	{
  1109 public:
  1110 	inline static TInt MinHeaderLength() {return 24; }
  1111 	inline static TInt MaxHeaderLength() {return 24; }
  1112 	inline TInt HeaderLength() const {return Length()*8; }
  1113 
  1114 	inline TInt Type() const
  1115 		{
  1116 		return i[0];
  1117 		}
  1118 	inline TInt Length() const
  1119 		{
  1120 		return i[1];
  1121 		}
  1122 	inline TInt Pref() const
  1123 		{
  1124 		return (i[3] >> 4) & 0xF;
  1125 		}
  1126 	inline TUint32 Lifetime() const
  1127 		{
  1128 		return (i[4] << 24) | (i[5] << 16) | (i[6] << 8) | i[7];
  1129 		}
  1130 	inline TIp6Addr &Address() const
  1131 		{
  1132 		return (TIp6Addr &)i[8];
  1133 		}
  1134 	//
  1135 	// Construct methods
  1136 	//
  1137 	inline void SetType(TInt aType)
  1138 		{
  1139 		i[0] = (TUint8)aType;
  1140 		}
  1141 	inline void SetLength(TInt aLength)
  1142 		{
  1143 		i[1] = (TUint8)aLength;
  1144 		}
  1145 	inline void SetPref(TInt aPref)
  1146 		{
  1147 		i[2] = (TUint8)(((aPref << 4) & 0xF0) | (i[2] & 0xF));
  1148 		}
  1149 	inline void SetLifetime(TUint32 aTime)
  1150 		{
  1151 		i[7] = (TUint8)aTime;
  1152 		i[6] = (TUint8)(aTime >> 8);
  1153 		i[5] = (TUint8)(aTime >> 16);
  1154 		i[4] = (TUint8)(aTime >> 24);
  1155 		}
  1156 
  1157 private:
  1158 	union
  1159 		{
  1160 		TUint8 i[24];	// The space allocated for MAX LENGTH
  1161 		TUint32 iAlign;	// A dummy member to force the 4 byte alignment
  1162 		};
  1163 	};
  1164 
  1165 #ifdef SYMBIAN_TCPIPDHCP_UPDATE
  1166 class TInet6OptionICMP_DnsInformationV1
  1167 /**
  1168 * ICMPv6 Recursive DNS Server Option(RFC-5006)
  1169 * IPv6 DNS Configuration based on Router Advertisement
  1170 *
  1171 *  
  1172 @verbatim
  1173 Recursive DNS Server Option
  1174 
  1175  0                   1                   2                   3
  1176  0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
  1177 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1178 |     Type      |     Length    |  		        Reserved        |
  1179 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1180 |                           Lifetime                            |
  1181 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1182 |                                                               |
  1183 :                     IPv6 Address of RDNSS                     :
  1184 |                                                               |
  1185 +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
  1186      
  1187 @endverbatim
  1188 * @publishedAll
  1189 * @released
  1190 */
  1191 	{
  1192 public:
  1193 	inline static TInt MinRdnssOptionLength() {return RDNSSOPTION_HDRLENGTH + RDNSSADDRSIZE;}//24
  1194 	
  1195 	inline static TInt MaxRdnssOptionLength() {return RDNSSOPTION_HDRLENGTH + (RDNSSADDRSIZE*RDNSS_MAX_ADDRESS); }//72
  1196 	
  1197 	inline TInt HeaderLength() const {return RDNSSOPTION_HDRLENGTH;}//8
  1198 	
  1199 	inline TInt Type() const
  1200 		{
  1201 		return i[0];
  1202 		}
  1203 	inline TInt Length() const
  1204 		{
  1205 		return i[1];
  1206 		}
  1207 	inline TUint32 Lifetime() const
  1208 		{
  1209 		return (i[4] << 24) | (i[5] << 16) | (i[6] << 8) | i[7];
  1210 		}
  1211 	inline TIp6Addr &Address() const
  1212 		{
  1213 		return (TIp6Addr &)i[8];
  1214 		}
  1215 	inline TIp6Addr &GetNextAddress(TInt aOffset) const
  1216 		{
  1217 		return (TIp6Addr &)i[aOffset];
  1218 		}
  1219 private:
  1220 	union
  1221 		{
  1222 		TUint8 i[RDNSSOPTION_HDRLENGTH + (RDNSSADDRSIZE * RDNSS_MAX_ADDRESS)];	// The space allocated for MAX LENGTH of 4 DNS address
  1223 		TUint32 iAlign;	// A dummy member to force the 4 byte alignment
  1224 		};
  1225 	};
  1226 #endif //SYMBIAN_TCPIPDHCP_UPDATE
  1227 #endif
  1228 
  1229 /**
  1230 * @name ICMPv6 Error Message Types (0-127)
  1231 */
  1232 //@{
  1233 const TUint8 KInet6ICMP_Unreachable		= 1;
  1234 const TUint8 KInet6ICMP_PacketTooBig	= 2;
  1235 const TUint8 KInet6ICMP_TimeExceeded	= 3;
  1236 const TUint8 KInet6ICMP_ParameterProblem= 4;
  1237 //@}
  1238 /**
  1239 * @name ICMPv6 Informational Message Types (128-255)
  1240 */
  1241 //@{
  1242 /** Echo Request. See TInet6HeaderICMP_Echo. */
  1243 const TUint8 KInet6ICMP_EchoRequest		= 128;
  1244 /** Echo Reply. See TInet6HeaderICMP_Echo. */
  1245 const TUint8 KInet6ICMP_EchoReply		= 129;
  1246 /** Not implemented. */
  1247 const TUint8 KInet6ICMP_GroupQuery		= 130;
  1248 /** Not implemented. */
  1249 const TUint8 KInet6ICMP_GroupReport		= 131;
  1250 /** Not implemented. */
  1251 const TUint8 KInet6ICMP_GroupDone		= 132;
  1252 /** Router Solicitation. See TInet6HeaderICMP_RouterSol. */
  1253 const TUint8 KInet6ICMP_RouterSol		= 133;
  1254 /** Router Advertisement. See TInet6HeaderICMP_RouterAdv. */
  1255 const TUint8 KInet6ICMP_RouterAdv		= 134;
  1256 /** Neighbor Solicitation. See TInet6HeaderICMP_NeighborSol. */
  1257 const TUint8 KInet6ICMP_NeighborSol		= 135;
  1258 /** Neighbor Advertisement. See TInet6HeaderICMP_NeighborAdv. */
  1259 const TUint8 KInet6ICMP_NeighborAdv		= 136;
  1260 /** Redirect. See TInet6HeaderICMP_Redirect. */
  1261 const TUint8 KInet6ICMP_Redirect		= 137;
  1262 //@}
  1263 
  1264 /**
  1265 * @name ICMPv6 Option types.
  1266 * The default derivation of the symbol
  1267 * is from the name of the header class by replacing 'T' with 'K' (or
  1268 * vice versa).
  1269 *
  1270 */
  1271 //@{
  1272 /** Source Link-Layer Address. See TInet6OptionICMP_LinkLayer. */
  1273 const TInt KInet6OptionICMP_SourceLink	= 1;
  1274 /** Target Link-Layer Address. See TInet6OptionICMP_LinkLayer. */
  1275 const TInt KInet6OptionICMP_TargetLink	= 2;
  1276 /** Prefix Information. See TInet6OptionICMP_Prefix. */
  1277 const TInt KInet6OptionICMP_Prefix		= 3;
  1278 /** Redirect Header. (not implemented). */
  1279 const TInt KInet6OptionICMP_Redirect	= 4;
  1280 /** MTU.  See TInet6OptionICMP_Mtu. */
  1281 const TInt KInet6OptionICMP_Mtu			= 5;
  1282 #ifdef SYMBIAN_TCPIPDHCP_UPDATE
  1283 /** RFC 5006: Recursive DNS Server Option. See TInet6OptionICMP_DnsInformationV1*/
  1284 const TInt KInet6OptionICMP_RDNSS		= 25;
  1285 #endif //SYMBIAN_TCPIPDHCP_UPDATE
  1286 #if 1
  1287 	// Experimental: draft-draves-ipngwg-router-selection-01.txt
  1288 	// Default Router Preferences and More-Specific Routes
  1289 	// *UNOFFICIAL NUMBER ASSIGNMENT (SAME AS MSR STACK)--REAL VALUE TBD*
  1290 /** Route Information. See TInet6OptionICMP_RouteInformation. */
  1291 const TInt KInet6OptionICMP_RouteInformation = 9;
  1292 #endif
  1293 //@}
  1294 
  1295 //@}
  1296 #endif