[Bro-Dev] [JIRA] (BIT-1472) Bif for a new function to calculates haversine distance between two geoip locations

Aashish Sharma (JIRA) jira at bro-tracker.atlassian.net
Thu Sep 3 08:53:00 PDT 2015


Aashish Sharma created BIT-1472:
-----------------------------------

             Summary: Bif for a new function to calculates haversine distance between two geoip locations
                 Key: BIT-1472
                 URL: https://bro-tracker.atlassian.net/browse/BIT-1472
             Project: Bro Issue Tracker
          Issue Type: New Feature
          Components: Bro
    Affects Versions: 2.4
            Reporter: Aashish Sharma


Merge request for:

topic/aashish/haversine


## ## Calculates haversine distance between two geoip locations
##
##
## lat1, long1, lat2, long2
##
## Returns: distance in miles
## function haversine_distance%(lat1:double, long1:double, lat2:double, long2:double %): double


accompanying bro policy in base/utils/haversine_distance_ip.bro

module GLOBAL;

## Returns the haversine distance between two IP addresses based on GeoIP
## database locations
##
##
## orig: the address of orig connection
## resp: the address of resp server
## Returns: the GeoIP distance between orig and resp in miles
function haversine_distance_ip(orig: addr, resp: addr): double




--
This message was sent by Atlassian JIRA
(v7.0.0-OD-02-259#70102)


More information about the bro-dev mailing list