Skip to content
/ netdb Public

Protocol, service, and ethertype netdb data for pure Go.

License

Notifications You must be signed in to change notification settings

thediveo/netdb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

netdb

pkg.go.dev GitHub build and test Go Report Card Coverage

netdb provides information about TCP/IP subsystem protocols and internet services, all this in (pure) Go. By default, it uses its built-in database instead of consulting /etc/protocols, /etc/services, and /etc/ethertypes. If needed, it can also consult these files, please see the examples in the documentation.

The built-in database has been auto-generated from the etc/protocols, etc/ethertypes, and etc/services files courtesy of the netbase package of the Debian project.

This netdb package does not even try to slavishly replicate the POSIX C API; instead, it attempts to be Go-ish. For instance, the C type servent has simply become the netdb.Service type in order to avoid arcane POSIX-rooted type names.

Please refer to the reference documentation for usage examples.

Acknowledgement

In some sense, this netdb package picks up the baton from the @dominikh/go-netdb package. However, it is not a fork but was written from scratch, considering (at least some of) the advice in issue #1 of the go-netdb package.

Copyright and License

netdb is Copyright 2021-24 Harald Albrecht, and licensed under the Apache License, Version 2.0.

About

Protocol, service, and ethertype netdb data for pure Go.

Resources

License

Stars

Watchers

Forks