fix type mismatch and bounds checking
This commit is contained in:
@@ -22,7 +22,7 @@
|
||||
// George F. Riley, Georgia Tech, Spring 2007
|
||||
|
||||
#include "ip-l4-protocol.h"
|
||||
#include "ns3/uinteger.h"
|
||||
#include "ns3/integer.h"
|
||||
#include "ns3/log.h"
|
||||
|
||||
namespace ns3 {
|
||||
@@ -38,9 +38,10 @@ IpL4Protocol::GetTypeId (void)
|
||||
.SetParent<Object> ()
|
||||
.SetGroupName ("Internet")
|
||||
.AddAttribute ("ProtocolNumber", "The IP protocol number.",
|
||||
UintegerValue (0),
|
||||
MakeUintegerAccessor (&IpL4Protocol::GetProtocolNumber),
|
||||
MakeUintegerChecker<int> ())
|
||||
TypeId::ATTR_GET,
|
||||
IntegerValue (0),
|
||||
MakeIntegerAccessor (&IpL4Protocol::GetProtocolNumber),
|
||||
MakeIntegerChecker<int> (0,255))
|
||||
;
|
||||
return tid;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user