Alexander Afanasyev | 864522f | 2012-05-31 13:33:57 -0700 | [diff] [blame] | 1 | From 4a928511196fd80e9e9c43646d916e2d6fbc3190 Mon Sep 17 00:00:00 2001 |
| 2 | From: Ilya Moiseenko <iliamo@ucla.edu> |
| 3 | Date: Thu, 1 Sep 2011 17:41:00 -0700 |
| 4 | Subject: [PATCH] point-to-point: Add support of PPP->Ethernet and |
| 5 | Ethernet->PPP frame type conversion for CCNx protocol |
| 6 | |
| 7 | point-to-point: Adding support for CCNx payload in PppHeader::Print method |
| 8 | --- |
| 9 | src/point-to-point/model/point-to-point-net-device.cc | 2 ++ |
| 10 | src/point-to-point/model/ppp-header.cc | 3 +++ |
| 11 | 2 files changed, 5 insertions(+) |
| 12 | |
| 13 | diff --git a/src/point-to-point/model/point-to-point-net-device.cc b/src/point-to-point/model/point-to-point-net-device.cc |
| 14 | index ca81c53..775ef00 100644 |
| 15 | --- a/src/point-to-point/model/point-to-point-net-device.cc |
| 16 | +++ b/src/point-to-point/model/point-to-point-net-device.cc |
| 17 | @@ -607,6 +607,7 @@ PointToPointNetDevice::PppToEther (uint16_t proto) |
| 18 | { |
| 19 | case 0x0021: return 0x0800; //IPv4 |
| 20 | case 0x0057: return 0x86DD; //IPv6 |
| 21 | + case 0x0077: return 0x7777; //CCNx |
| 22 | default: NS_ASSERT_MSG (false, "PPP Protocol number not defined!"); |
| 23 | } |
| 24 | return 0; |
| 25 | @@ -619,6 +620,7 @@ PointToPointNetDevice::EtherToPpp (uint16_t proto) |
| 26 | { |
| 27 | case 0x0800: return 0x0021; //IPv4 |
| 28 | case 0x86DD: return 0x0057; //IPv6 |
| 29 | + case 0x7777: return 0x0077; //CCNx |
| 30 | default: NS_ASSERT_MSG (false, "PPP Protocol number not defined!"); |
| 31 | } |
| 32 | return 0; |
| 33 | diff --git a/src/point-to-point/model/ppp-header.cc b/src/point-to-point/model/ppp-header.cc |
| 34 | index 4650fb0..7e000bd 100644 |
| 35 | --- a/src/point-to-point/model/ppp-header.cc |
| 36 | +++ b/src/point-to-point/model/ppp-header.cc |
| 37 | @@ -66,6 +66,9 @@ PppHeader::Print (std::ostream &os) const |
| 38 | case 0x0057: /* IPv6 */ |
| 39 | proto = "IPv6 (0x0057)"; |
| 40 | break; |
| 41 | + case 0x0077: /* CCNx */ |
| 42 | + proto = "CCNx (0x0077)"; |
| 43 | + break; |
| 44 | default: |
| 45 | NS_ASSERT_MSG (false, "PPP Protocol number not defined!"); |
| 46 | } |
| 47 | -- |
| 48 | 1.7.10.2 |
| 49 | |