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
alshabib
2014-09-12 17:59:35 -0700
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
369d29493ae1c5d84c9e99bc869cee2b0647d97f
369d2949
1 parent
f6d77960
some interface changes to flow and packet
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
56 additions
and
8 deletions
core/api/src/main/java/org/onlab/onos/net/flow/Criteria.java
core/api/src/main/java/org/onlab/onos/net/flow/FlowRule.java
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java
core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java
core/api/src/main/java/org/onlab/onos/net/flow/TrafficTreatment.java
core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java
core/api/src/main/java/org/onlab/onos/net/packet/PacketProvider.java
core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderRegistry.java
core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderService.java
core/api/src/main/java/org/onlab/onos/net/packet/PacketService.java
core/api/src/main/java/org/onlab/onos/net/flow/Criteria.java
View file @
369d294
...
...
@@ -20,6 +20,18 @@ public final class Criteria {
return
null
;
}
/**
* Creates a match on ETH_DST field using the specified value. This value
* may be a wildcard mask.
*
* @param macValue MAC address value or wildcard mask
* @return match criterion
*/
public
static
Criterion
matchEthDst
(
MACValue
macValue
)
{
return
null
;
}
// Dummy to illustrate the concept for now; delete ASAP
private
static
class
MACValue
{
}
}
...
...
core/api/src/main/java/org/onlab/onos/net/flow/FlowRule.java
View file @
369d294
...
...
@@ -2,14 +2,14 @@ package org.onlab.onos.net.flow;
import
org.onlab.onos.net.DeviceId
;
import
java.util.List
;
/**
* Represents a generalized match & action pair to be applied to
* an infrastucture device.
*/
public
interface
FlowRule
{
//TODO: build cookie value
/**
* Returns the flow rule priority given in natural order; higher numbers
* mean higher priorities.
...
...
@@ -38,6 +38,6 @@ public interface FlowRule {
*
* @return traffic treatment
*/
List
<
Treatment
>
treatments
();
TrafficTreatment
treatment
();
}
...
...
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleProviderService.java
View file @
369d294
...
...
@@ -22,4 +22,11 @@ public interface FlowRuleProviderService extends ProviderService<FlowRuleProvide
*/
void
flowMissing
(
FlowRule
flowRule
);
/**
* Signals that a flow rule was indeed added.
*
* @param flowRule the added flow rule
*/
void
flowAdded
(
FlowRule
flowRule
);
}
...
...
core/api/src/main/java/org/onlab/onos/net/flow/FlowRuleService.java
View file @
369d294
...
...
@@ -26,6 +26,15 @@ public interface FlowRuleService {
void
applyFlowRules
(
FlowRule
...
flowRules
);
/**
* Removes the specified flow rules from their respective devices.
*
* @param flowRules one or more flow rules
* throws SomeKindOfException that indicates which ones were removed and
* which ones failed
*/
void
removeFlowRules
(
FlowRule
...
flowRules
);
/**
* Adds the specified flow rule listener.
*
* @param listener flow rule listener
...
...
core/api/src/main/java/org/onlab/onos/net/flow/TrafficSelector.java
View file @
369d294
...
...
@@ -24,8 +24,9 @@ public interface TrafficSelector {
* already been added, it will be replaced by this one.
*
* @param criterion new criterion
* @return self
*/
void
add
(
Criterion
criterion
);
Builder
add
(
Criterion
criterion
);
/**
* Builds an immutable traffic selector.
...
...
core/api/src/main/java/org/onlab/onos/net/flow/TrafficTreatment.java
View file @
369d294
...
...
@@ -25,7 +25,7 @@ public interface TrafficTreatment {
*
* @param instruction new instruction
*/
void
add
(
Instruction
instruction
);
Builder
add
(
Instruction
instruction
);
/**
* Builds an immutable traffic treatment descriptor.
...
...
core/api/src/main/java/org/onlab/onos/net/packet/PacketProcessor.java
View file @
369d294
package
org
.
onlab
.
onos
.
net
.
packet
;
/**
* Abstraction of an inbound packet processor.
*/
public
interface
PacketProcessor
{
public
static
final
int
ADVISOR_MAX
=
Integer
.
MAX_VALUE
/
3
;
public
static
final
int
DIRECTOR_MAX
=
(
Integer
.
MAX_VALUE
/
3
)
*
2
;
public
static
final
int
OBSERVER_MAX
=
Integer
.
MAX_VALUE
;
/**
* Processes the inbound packet as specified in the given context.
*
...
...
core/api/src/main/java/org/onlab/onos/net/packet/PacketProvider.java
View file @
369d294
package
org
.
onlab
.
onos
.
net
.
packet
;
import
org.onlab.onos.net.provider.Provider
;
/**
* Abstraction of a packet provider capable of emitting packets.
*/
public
interface
PacketProvider
{
public
interface
PacketProvider
extends
Provider
{
/**
* Emits the specified outbound packet onto the network.
...
...
core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderRegistry.java
0 → 100644
View file @
369d294
package
org
.
onlab
.
onos
.
net
.
packet
;
import
org.onlab.onos.net.provider.ProviderRegistry
;
/**
* Abstraction of an infrastructure packet provider registry.
*/
public
interface
PacketProviderRegistry
extends
ProviderRegistry
<
PacketProvider
,
PacketProviderService
>
{
}
core/api/src/main/java/org/onlab/onos/net/packet/PacketProviderService.java
View file @
369d294
package
org
.
onlab
.
onos
.
net
.
packet
;
import
org.onlab.onos.net.provider.ProviderService
;
/**
* Entity capable of processing inbound packets.
*/
public
interface
PacketProviderService
{
public
interface
PacketProviderService
extends
ProviderService
<
PacketProvider
>
{
/**
* Submits inbound packet context for processing. This processing will be
...
...
core/api/src/main/java/org/onlab/onos/net/packet/PacketService.java
View file @
369d294
...
...
@@ -18,7 +18,7 @@ public interface PacketService {
* @throws java.lang.IllegalArgumentException if a processor with the
* given priority already exists
*/
void
addProcessor
(
PacketProcessor
processor
,
long
priority
);
void
addProcessor
(
PacketProcessor
processor
,
int
priority
);
/**
* Removes the specified processor from the processing pipeline.
...
...
Please
register
or
login
to post a comment