equal
deleted
inserted
replaced
|
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 // addr46.h - an extention to TIp6Addr |
|
15 // |
|
16 |
|
17 |
|
18 |
|
19 /** |
|
20 @internalComponent |
|
21 */ |
|
22 #ifndef __addr46_H__ |
|
23 #define __addr46_H__ |
|
24 |
|
25 #include <in_sock.h> |
|
26 |
|
27 // |
|
28 // TIp46Addr |
|
29 // ********* |
|
30 // Provides some additional methods for handling |
|
31 // both real IPv6 addresses and mangled IPv4 addresses |
|
32 // in somewhat uniform way. |
|
33 // |
|
34 class TIp46Addr : public TIp6Addr |
|
35 { |
|
36 public: |
|
37 inline TIp46Addr() {} // inline to make declaring variable short in code |
|
38 TIp46Addr(const TUint32 aAddr); |
|
39 TIp46Addr(const TInetAddr &aAddr); |
|
40 inline static const TIp46Addr &Cast(const TIp6Addr &aAddr) { return *((TIp46Addr *)&aAddr); } |
|
41 inline static const TIp46Addr &Cast(const TIp6Addr *aAddr) { return *((TIp46Addr *)aAddr); } |
|
42 |
|
43 TBool IsMulticast() const; // Return TRUE if address is IPv4 or IPv6 multicast |
|
44 TBool IsLinkLocal() const; // Return TRUE if address is IPv4 or IPv6 linklocal |
|
45 TBool IsUnspecified() const;// Return TRUE if address is :: or ::ffff:0.0.0.0 |
|
46 }; |
|
47 |
|
48 #endif |