@@ -107,6 +107,7 @@ def pfx2as(
107
107
self ,
108
108
* ,
109
109
format : Literal ["JSON" , "CSV" ] | NotGiven = NOT_GIVEN ,
110
+ longest_prefix_match : bool | NotGiven = NOT_GIVEN ,
110
111
origin : int | NotGiven = NOT_GIVEN ,
111
112
prefix : str | NotGiven = NOT_GIVEN ,
112
113
rpki_status : Literal ["VALID" , "INVALID" , "UNKNOWN" ] | NotGiven = NOT_GIVEN ,
@@ -118,14 +119,17 @@ def pfx2as(
118
119
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
119
120
) -> RoutePfx2asResponse :
120
121
"""
121
- Lookup prefix-to-origin mapping on global routing tables.
122
+ Lookup prefix-to-ASN mapping on global routing tables.
122
123
123
124
Args:
124
125
format: Format results are returned in.
125
126
127
+ longest_prefix_match: Return only results with the longest prefix match for the given prefix. For
128
+ example, specify a /32 prefix to lookup the origin ASN for an IPv4 address.
129
+
126
130
origin: Lookup prefixes originated by the given ASN
127
131
128
- prefix: Lookup origins of the given prefix
132
+ prefix: Lookup origin ASNs of the given prefix
129
133
130
134
rpki_status: Return only results with matching rpki status: valid, invalid or unknown
131
135
@@ -147,6 +151,7 @@ def pfx2as(
147
151
query = maybe_transform (
148
152
{
149
153
"format" : format ,
154
+ "longest_prefix_match" : longest_prefix_match ,
150
155
"origin" : origin ,
151
156
"prefix" : prefix ,
152
157
"rpki_status" : rpki_status ,
@@ -356,6 +361,7 @@ async def pfx2as(
356
361
self ,
357
362
* ,
358
363
format : Literal ["JSON" , "CSV" ] | NotGiven = NOT_GIVEN ,
364
+ longest_prefix_match : bool | NotGiven = NOT_GIVEN ,
359
365
origin : int | NotGiven = NOT_GIVEN ,
360
366
prefix : str | NotGiven = NOT_GIVEN ,
361
367
rpki_status : Literal ["VALID" , "INVALID" , "UNKNOWN" ] | NotGiven = NOT_GIVEN ,
@@ -367,14 +373,17 @@ async def pfx2as(
367
373
timeout : float | httpx .Timeout | None | NotGiven = NOT_GIVEN ,
368
374
) -> RoutePfx2asResponse :
369
375
"""
370
- Lookup prefix-to-origin mapping on global routing tables.
376
+ Lookup prefix-to-ASN mapping on global routing tables.
371
377
372
378
Args:
373
379
format: Format results are returned in.
374
380
381
+ longest_prefix_match: Return only results with the longest prefix match for the given prefix. For
382
+ example, specify a /32 prefix to lookup the origin ASN for an IPv4 address.
383
+
375
384
origin: Lookup prefixes originated by the given ASN
376
385
377
- prefix: Lookup origins of the given prefix
386
+ prefix: Lookup origin ASNs of the given prefix
378
387
379
388
rpki_status: Return only results with matching rpki status: valid, invalid or unknown
380
389
@@ -396,6 +405,7 @@ async def pfx2as(
396
405
query = await async_maybe_transform (
397
406
{
398
407
"format" : format ,
408
+ "longest_prefix_match" : longest_prefix_match ,
399
409
"origin" : origin ,
400
410
"prefix" : prefix ,
401
411
"rpki_status" : rpki_status ,
0 commit comments