Toggle navigation
Toggle navigation
This project
Loading...
Sign in
홍길동
/
onos
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Snippets
Network
Create a new issue
Builds
Commits
Issue Boards
Authored by
Jonathan Hart
2014-10-09 09:34:39 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
704ca14a42f7136b969714f999497346ce5a84a3
704ca14a
1 parent
3f146400
Unit tests for the ProxyArpManager.
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java
core/net/src/test/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManagerTest.java
core/net/src/main/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManager.java
View file @
704ca14
...
...
@@ -55,6 +55,7 @@ public class ProxyArpManager implements ProxyArpService {
private
static
final
String
REQUEST_NULL
=
"Arp request cannot be null."
;
private
static
final
String
REQUEST_NOT_ARP
=
"Ethernet frame does not contain ARP request."
;
private
static
final
String
NOT_ARP_REQUEST
=
"ARP is not a request."
;
private
static
final
String
NOT_ARP_REPLY
=
"ARP is not a reply."
;
@Reference
(
cardinality
=
ReferenceCardinality
.
MANDATORY_UNARY
)
protected
HostService
hostService
;
...
...
@@ -141,7 +142,7 @@ public class ProxyArpManager implements ProxyArpService {
checkArgument
(
eth
.
getEtherType
()
==
Ethernet
.
TYPE_ARP
,
REQUEST_NOT_ARP
);
ARP
arp
=
(
ARP
)
eth
.
getPayload
();
checkArgument
(
arp
.
getOpCode
()
==
ARP
.
OP_REPLY
,
NOT_ARP_RE
QUEST
);
checkArgument
(
arp
.
getOpCode
()
==
ARP
.
OP_REPLY
,
NOT_ARP_RE
PLY
);
Host
h
=
hostService
.
getHost
(
HostId
.
hostId
(
eth
.
getDestinationMAC
(),
VlanId
.
vlanId
(
eth
.
getVlanID
())));
...
...
core/net/src/test/java/org/onlab/onos/net/proxyarp/impl/ProxyArpManagerTest.java
0 → 100644
View file @
704ca14
This diff is collapsed. Click to expand it.
Please
register
or
login
to post a comment