blob: 2af712ecdfef914335182ac425703434c5dacf28 [file] [log] [blame]
Alexander Afanasyev864522f2012-05-31 13:33:57 -07001From 4a928511196fd80e9e9c43646d916e2d6fbc3190 Mon Sep 17 00:00:00 2001
2From: Ilya Moiseenko <iliamo@ucla.edu>
3Date: Thu, 1 Sep 2011 17:41:00 -0700
4Subject: [PATCH] point-to-point: Add support of PPP->Ethernet and
5 Ethernet->PPP frame type conversion for CCNx protocol
6
7point-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
13diff --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
14index 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;
33diff --git a/src/point-to-point/model/ppp-header.cc b/src/point-to-point/model/ppp-header.cc
34index 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--
481.7.10.2
49