Пример #1
0
 /**
  * Adds/replaces a route entry via {@link #rtconfigPort}.
  *
  * @param entryExtension_ The extension defined in {@link drcl.inet.data.RTEntry}.
  * @see drcl.inet.contract.RTConfig
  */
 protected void addRTEntry(RTKey key_, int[] interfaces, Object entryExtension_, double timeout) {
   RTConfig.add(
       key_,
       new RTEntry(RTConfig.NEXT_HOP_NO_CHANGE, new drcl.data.BitSet(interfaces), entryExtension_),
       timeout,
       rtconfigPort);
 }
Пример #2
0
 /**
  * Replaces the route entry extension object and timeout, and leaves other fields intact via
  * {@link #rtconfigPort}.
  *
  * @param entryExtension_ The extension defined in {@link drcl.inet.data.RTEntry}.
  * @see drcl.inet.contract.RTConfig
  */
 protected void replaceRTEntry(RTKey key_, Object entryExtension_, double timeout_) {
   RTConfig.add(
       key_,
       new RTEntry(RTConfig.NEXT_HOP_NO_CHANGE, RTConfig.OUT_IFS_NO_CHANGE, entryExtension_),
       timeout_,
       rtconfigPort);
 }
Пример #3
0
 /**
  * Adds/replaces a route entry via {@link #rtconfigPort}.
  *
  * @param entryExtension_ The extension defined in {@link drcl.inet.data.RTEntry}.
  * @see drcl.inet.contract.RTConfig
  */
 public void addRTEntry(
     RTKey key_,
     long nexthop_,
     drcl.data.BitSet interfaces,
     Object entryExtension_,
     double timeout) {
   RTConfig.add(key_, new RTEntry(nexthop_, interfaces, entryExtension_), timeout, rtconfigPort);
 }
Пример #4
0
 /**
  * Adds/replaces a route entry via {@link #rtconfigPort}.
  *
  * @see drcl.inet.contract.RTConfig
  */
 protected void addRTEntry(RTEntry entry_, double timeout) {
   RTConfig.add(entry_.getKey(), entry_, timeout, rtconfigPort);
 }
Пример #5
0
 /**
  * Retrieves all the route entries of the same source field via {@link #rtconfigPort}.
  *
  * @see drcl.inet.contract.RTConfig
  */
 public Object retrieveRTEntrySrc(long source) {
   return RTConfig.retrieve(
       new RTKey(source, -1, -1, 0, -1, 0), RTConfig.MATCH_WILDCARD, rtconfigPort);
 }
Пример #6
0
 /**
  * Retrieves the best (longest matched) route entry of the same destination field via {@link
  * #rtconfigPort}.
  *
  * @see drcl.inet.contract.RTConfig
  */
 public RTEntry retrieveBestRTEntryDest(long destination) {
   return (RTEntry)
       RTConfig.retrieve(
           new RTKey(-1, 0, destination, -1, -1, 0), RTConfig.MATCH_LONGEST, rtconfigPort);
 }
Пример #7
0
 /**
  * Retrieves all the route entries of the same destination field via {@link #rtconfigPort}.
  *
  * @see drcl.inet.contract.RTConfig
  */
 public Object retrieveRTEntryDest(long destination) {
   return RTConfig.retrieve(
       new RTKey(-1, 0, destination, -1, -1, 0), RTConfig.MATCH_WILDCARD, rtconfigPort);
 }
Пример #8
0
 /**
  * Retrieves all the route entries via {@link #rtconfigPort}.
  *
  * @see drcl.inet.contract.RTConfig
  */
 public RTEntry[] retrieveAllRTEntries() {
   Object result_ =
       RTConfig.retrieve(new RTKey(0, 0, 0, 0, 0, 0), RTConfig.MATCH_WILDCARD, rtconfigPort);
   if (result_ instanceof RTEntry) return new RTEntry[] {(RTEntry) result_};
   else return (RTEntry[]) result_;
 }
Пример #9
0
 /**
  * Retrieves matched route entries via {@link #rtconfigPort}.
  *
  * @see drcl.inet.contract.RTConfig
  */
 public Object retrieveRTEntry(RTKey key_, String type) {
   return RTConfig.retrieve(key_, type, rtconfigPort);
 }
Пример #10
0
 /**
  * Prunes a route entry from a list of outgoing interfaces via {@link #rtconfigPort}.
  *
  * @param entryExtension_ The extension defined in {@link drcl.inet.data.RTEntry}.
  * @see drcl.inet.contract.RTConfig
  */
 public void pruneRTEntry(
     RTKey key_, drcl.data.BitSet interfaces, Object entryExtension_, double timeout) {
   RTConfig.prune(key_, interfaces, entryExtension_, timeout, rtconfigPort);
 }
Пример #11
0
 /**
  * Grafts a route entry to a list of outgoing interfaces via {@link #rtconfigPort}.
  *
  * @param entryExtension_ The extension defined in {@link drcl.inet.data.RTEntry}.
  * @see drcl.inet.contract.RTConfig
  */
 public void graftRTEntry(RTKey key_, int[] interfaces, Object entryExtension_, double timeout) {
   RTConfig.graft(key_, new drcl.data.BitSet(interfaces), entryExtension_, timeout, rtconfigPort);
 }