Skip to content

Commit d650165

Browse files
committed
Added parent & neighbors to ext. key search
Modified the ojnipap API function searchPrefixExtKey to include neighboring and closest parent prefixes.
1 parent 28aa51f commit d650165

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

ojnipap/ojnipap/API.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,11 @@ public static ARRAY searchPrefixExtKey(OConnection conn, String external_key, OS
210210
search_query.put("val1", "external_key");
211211
search_query.put("val2", external_key);
212212

213+
// Modify search options to include network & all neighboring prefixes
214+
// (most importantly: the default gateway)
215+
search_options.put("include_neighbors", Boolean.valueOf(true));
216+
search_options.put("parents_depth", new Integer(1));
217+
213218
// Perform search
214219
Map result = Prefix.search((jnipap.Connection)conn, search_query, search_options);
215220

0 commit comments

Comments
 (0)