/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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); }
/** * 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_; }
/** * 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); }
/** * 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); }
/** * 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); }