Hristo Venev
Hristo Venev

Reputation: 992

When are the getnet* functions used?

getnetbyaddr, getnetbyname, getnetent, etc.

I saw these functions but I still can't find a place where they are used (apart from libc unit tests). What are they useful for and why were they written in the first place?

Upvotes: 1

Views: 70

Answers (1)

John Bollinger
John Bollinger

Reputation: 180256

I suppose the question amounts to what network entries are good for. For the most part, they are used for routing. For instance, you should expect to see one or more of the functions in question being used by the route(8) and netstat(8) programs.

Inasmuch as most hosts do not perform any but the simplest of routing for themselves these days, these functions' usefulness is pretty specialized.

Upvotes: 1

Related Questions