Hello Gisle,
thanks for your mail.
This flag 'LOC_NETWORK_FLAG_BOGON' does not exist (yet). Would it be possible?
In theory, yes, but there is no need for another flag: If there is is no announcement for a network, it is considered to be a bogon.
So, all you need to do is to check if loc_database_lookup() gives you an ASN for the queried IP address. :-)
And is there any relationship between a "Bogon" and 'LOC_NETWORK_FLAG_DROP' flag?
Not really. Some bogons might get that flag as well, if they appear at Spamhaus DROP (which will be our primary source for LOC_NETWORK_FLAG_DROP); see https://www.spamhaus.org/sbl/query/SBL504836 for an example.
So, there might be some overlap in practice, but these are not inherently related to each other.
Thanks, and best regards, Peter Müller