Skip to content
thediveoPublic

About

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

Resources

Contributing

Stars

5 stars

Watchers

1 watching

Forks

Latest commit

 

History

24 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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.

DevContainer

Caution

Do not use VSCode's "Dev Containers: Clone Repository in Container Volume" command, as it is utterly broken by design, ignoring .devcontainer/devcontainer.json.

  1. git clone https://github.com/thediveo/netdb
  2. in VSCode: Ctrl+Shift+P, "Dev Containers: Open Workspace in Container..."
  3. select netdb.code-workspace and off you go...

Supported Go Versions

netdb supports versions of Go that are noted by the Go release policy, that is, major versions N and N-1 (where N is the current major version).

Contributing

Please see CONTRIBUTING.md.

Copyright and License

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

About

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

Resources

Contributing

Stars

5 stars

Watchers

1 watching

Forks

Releases

Used by

Contributors

Languages