MCPcopy Create free account
hub / github.com/RangeNetworks/openbts / includesPort

Function includesPort

Peering/NeighborTable.cpp:66–71  ·  view source on GitHub ↗

Does the ipaddr include a port specification? This will fail miserably with ipv6.

Source from the content-addressed store, hash-verified

64// Does the ipaddr include a port specification?
65// This will fail miserably with ipv6.
66bool includesPort(const char *ipaddr)
67{
68 const char *colon = strrchr(ipaddr,':');
69 const char *dot = strrchr(ipaddr,'.');
70 return colon && colon > dot; // Works if dot is NULL too.
71}
72
73
74// (pat) 5-25: Allow the config neighbor list to optionally include a port.

Callers 1

fillMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected