Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/coredhcp/coredhcp
/ functions
Functions
175 in github.com/coredhcp/coredhcp
⨍
Functions
175
◇
Types & classes
24
↓ 56 callers
Method
Error
String returns a human-readable error message for a DoubleFree error
plugins/allocators/allocator.go:43
↓ 27 callers
Method
Close
Close closes all listening connections
server/serve.go:179
↓ 22 callers
Function
GetLogger
GetLogger returns a configured logger instance
logger/logger.go:22
↓ 13 callers
Method
Allocate
Allocate finds a suitable prefix of the given size and returns it. hint is a prefix, which the client desires especially, and that the allocator MAY
plugins/allocators/allocator.go:27
↓ 13 callers
Function
ConfigErrorFromString
ConfigErrorFromString returns a ConfigError from the given error string.
config/errors.go:17
↓ 13 callers
Function
loadRecords
loadRecords loads the DHCPv6/v4 Records global map with records stored on the specified file. The records have to be one per line, a mac address and a
plugins/range/storage.go:30
↓ 12 callers
Function
Offset
Offset returns the absolute distance between addresses `a` and `b` in units of /`prefixLength` subnets. Both addresses will have a /`prefixLength` mas
plugins/allocators/ipcalc.go:30
↓ 11 callers
Function
makeTestDUID
(uuid string)
plugins/serverid/plugin_test.go:14
↓ 8 callers
Function
AddPrefixes
AddPrefixes returns the `n`th /`unit` subnet after the `ip` base subnet. It is the converse operation of Offset(), used to retrieve a prefix from the
plugins/allocators/ipcalc.go:89
↓ 8 callers
Function
LoadDHCPv4Records
LoadDHCPv4Records loads the DHCPv4Records global map with records stored on the specified file. The records have to be one per line, a mac address and
plugins/file/plugin.go:90
↓ 8 callers
Function
LoadDHCPv6Records
LoadDHCPv6Records loads the DHCPv6Records global map with records stored on the specified file. The records have to be one per line, a mac address and
plugins/file/plugin.go:97
↓ 8 callers
Function
checkValidNetmask
(netmask net.IPMask)
plugins/netmask/plugin.go:57
↓ 8 callers
Function
setupFile
(v6 bool, args ...string)
plugins/file/plugin.go:243
↓ 7 callers
Function
testDBSetup
()
plugins/range/storage_test.go:17
↓ 6 callers
Method
Free
Free returns the prefix containing the given network to the pool Free may return a DoubleFreeError if the prefix being returned was not previously al
plugins/allocators/allocator.go:33
↓ 6 callers
Function
setup4
(args ...string)
plugins/staticroute/plugin.go:28
↓ 5 callers
Method
freeIPAddress
freeIPAddress removes a lease from storage
plugins/range/storage.go:80
↓ 5 callers
Function
setup4
(args ...string)
plugins/netmask/plugin.go:30
↓ 4 callers
Function
Handler4
(req, resp *dhcpv4.DHCPv4)
plugins/autoconfigure/plugin.go:63
↓ 4 callers
Function
Handler6
Handler6 handles DHCPv6 packets for the server_id plugin.
plugins/serverid/plugin.go:36
↓ 4 callers
Function
getAllocator
(bits int)
plugins/allocators/bitmap/bitmap_test.go:16
↓ 4 callers
Function
protoVersionCheck
(v protocolVersion)
config/config.go:86
↓ 3 callers
Method
Handler4
Handler4 handles DHCPv4 packets for the range plugin
plugins/range/plugin.go:51
↓ 3 callers
Function
NewBitmapAllocator
NewBitmapAllocator creates a new allocator, allocating /`size` prefixes carved out of the given `pool` prefix
plugins/allocators/bitmap/bitmap.go:110
↓ 3 callers
Function
addPrefix
(resp *dhcpv6.OptIAPD, l lease)
plugins/prefix/plugin.go:253
↓ 3 callers
Method
registerBackingDB
registerBackingDB installs a database connection string as the backing store for leases
plugins/range/storage.go:96
↓ 3 callers
Method
saveIPAddress
saveIPAddress writes out a lease to storage
plugins/range/storage.go:62
↓ 2 callers
Function
Handler4
Handler4 handles DHCPv4 packets for the dns plugin
plugins/dns/plugin.go:78
↓ 2 callers
Function
Handler4
Handler4 handles DHCPv4 packets for the mtu plugin
plugins/mtu/plugin.go:45
↓ 2 callers
Function
Handler4
Handler4 handles DHCPv4 packets for the file plugin
plugins/file/plugin.go:216
↓ 2 callers
Function
Handler4
(req, resp *dhcpv4.DHCPv4)
plugins/ipv6only/plugin.go:53
↓ 2 callers
Function
Handler6
Handler6 handles DHCPv6 packets for the dns plugin
plugins/dns/plugin.go:64
↓ 2 callers
Function
Handler6
Handler6 handles DHCPv6 packets for the file plugin
plugins/file/plugin.go:174
↓ 2 callers
Function
NewIPv4Allocator
NewIPv4Allocator creates a new allocator suitable for giving out IPv4 addresses
plugins/allocators/bitmap/bitmap_ipv4.go:106
↓ 2 callers
Function
RegisterPlugin
RegisterPlugin registers a plugin.
plugins/plugin.go:36
↓ 2 callers
Function
Start
Start will start the server asynchronously. See `Wait` to wait until the execution ends.
server/serve.go:116
↓ 2 callers
Method
Wait
Wait waits until the end of the execution of the server.
server/serve.go:166
↓ 2 callers
Function
copySlice
copySlice creates a new copy of a string slice in memory. This helps to ensure that downstream plugins can't corrupt this plugin's configuration
plugins/searchdomains/plugin.go:47
↓ 2 callers
Function
dup
(src *net.IPNet)
plugins/prefix/plugin.go:263
↓ 2 callers
Function
expandLLMulticast
BUG(Natolumin): When listening on link-local multicast addresses without binding to a specific interface, new interfaces coming up after the server st
config/config.go:247
↓ 2 callers
Function
getLogLevels
()
cmds/coredhcp/main.go:56
↓ 2 callers
Function
getv4Allocator
()
plugins/allocators/bitmap/bitmap_ipv4_test.go:12
↓ 2 callers
Function
loadDB
(path string)
plugins/range/storage.go:16
↓ 2 callers
Function
loadDHCPRecords
loadDHCPRecords loads the MAC<->IP mappings with records stored on the specified file. The records have to be one per line, a mac address and an IP ad
plugins/file/plugin.go:104
↓ 2 callers
Function
loadFromFile
(v6 bool, filename string)
plugins/file/plugin.go:292
↓ 2 callers
Function
parseArgs
(args ...string)
plugins/nbp/nbp.go:57
↓ 2 callers
Method
parseConfig
(ver protocolVersion)
config/config.go:209
↓ 2 callers
Function
prefixSizeForAllocs
(allocs int)
plugins/allocators/bitmap/bitmap_test.go:95
↓ 2 callers
Function
recordKey
recordKey computes the key for the Records array from the client ID
plugins/prefix/plugin.go:101
↓ 2 callers
Function
samePrefix
samePrefix returns true if both prefixes are defined and equal The empty prefix is equal to nothing, not even itself
plugins/prefix/plugin.go:93
↓ 2 callers
Function
splitHostPort
BUG(Natolumin): listen specifications of the form `[ip6]%iface:port` or `[ip6]%iface` are not supported, even though they are the default format of th
config/config.go:127
↓ 2 callers
Method
toIndex
prefix must verify: containing.Mask.Size < prefix.Mask.Size < page
plugins/allocators/bitmap/bitmap.go:39
↓ 2 callers
Method
toOffset
(ip net.IP)
plugins/allocators/bitmap/bitmap_ipv4.go:47
↓ 2 callers
Method
toPrefix
(idx uint)
plugins/allocators/bitmap/bitmap.go:48
↓ 1 callers
Method
Error
()
config/errors.go:30
↓ 1 callers
Method
HandleMsg4
(buf []byte, oob *ipv4.ControlMessage, _peer net.Addr)
server/handle.go:102
↓ 1 callers
Method
HandleMsg6
HandleMsg6 runs for every received DHCPv6 packet. It will run every registered handler in sequence, and reply with the resulting response. It will not
server/handle.go:23
↓ 1 callers
Function
Handler4
Handler4 handles DHCPv4 packets for the netmask plugin
plugins/netmask/plugin.go:52
↓ 1 callers
Function
Load
Load reads a configuration file and returns a Config object, or an error if any.
config/config.go:57
↓ 1 callers
Function
LoadPlugins
LoadPlugins reads a Config object and loads the plugins as specified in the `plugins` section, in order. For a plugin to be available, it must have be
plugins/plugin.go:56
↓ 1 callers
Function
New
New returns a new initialized instance of a Config object
config/config.go:38
↓ 1 callers
Method
Serve
XXX: investigate using RecvMsgs to batch messages and reduce syscalls Serve6 handles datagrams received on conn and passes them to the pluginchain
server/handle.go:209
↓ 1 callers
Method
Serve
Serve6 handles datagrams received on conn and passes them to the pluginchain
server/handle.go:228
↓ 1 callers
Function
WithFile
WithFile logs to the specified file in addition to the existing output.
logger/logger.go:39
↓ 1 callers
Function
WithNoStdOutErr
WithNoStdOutErr disables logging to stdout/stderr.
logger/logger.go:44
↓ 1 callers
Function
defaultListen
(ver protocolVersion)
config/config.go:279
↓ 1 callers
Function
duplicatesWarning
(ipAddresses map[string]int)
plugins/file/plugin.go:158
↓ 1 callers
Method
getListenAddress
(addr string, ver protocolVersion)
config/config.go:145
↓ 1 callers
Method
getPlugins
(ver protocolVersion)
config/config.go:198
↓ 1 callers
Method
handleRelease
(req, _ *dhcpv4.DHCPv4, record *Record)
plugins/range/plugin.go:101
↓ 1 callers
Function
listen4
(a *net.UDPAddr)
server/serve.go:48
↓ 1 callers
Function
listen6
(a *net.UDPAddr)
server/serve.go:82
↓ 1 callers
Function
makeSleepHandler4
(delay time.Duration)
plugins/sleep/plugin.go:81
↓ 1 callers
Function
makeSleepHandler6
(delay time.Duration)
plugins/sleep/plugin.go:71
↓ 1 callers
Method
parseListen
(ver protocolVersion)
config/config.go:297
↓ 1 callers
Function
parsePlugins
(pluginList []interface{})
config/config.go:93
↓ 1 callers
Function
runClient6
runInNs will execute the provided cmd in the namespace nsName. It returns the error status of the cmd. Errors in NS management will panic
integ/server6/server6.go:78
↓ 1 callers
Function
runServer
This function *must* be run in its own routine For now this assumes ns are created outside. TODO: dynamically create NS and interfaces directly in the
integ/server6/server6.go:49
↓ 1 callers
Function
sendEthernet
this function sends an unicast to the hardware address defined in resp.ClientHWAddr, the layer3 destination address is still the broadcast address; if
server/sendEthernet.go:23
↓ 1 callers
Function
setupPrefix
(args ...string)
plugins/prefix/plugin.go:47
↓ 1 callers
Method
toIP
(offset uint32)
plugins/allocators/bitmap/bitmap_ipv4.go:37
Method
Allocate
Allocate reserves an IP for a client
plugins/allocators/bitmap/bitmap_ipv4.go:61
Method
Allocate
Allocate reserves a maxsize-sized block and returns a block of size min(maxsize, hint.size)
plugins/allocators/bitmap/bitmap.go:54
Method
Allocate
(hint net.IPNet)
plugins/range/plugin_test.go:22
Method
Allocate
(hint net.IPNet)
plugins/range/plugin_test.go:35
Function
BenchmarkOffset
Offset is used as a hash function, so it needs to be reasonably fast
plugins/allocators/ipcalc_test.go:59
Function
BenchmarkParallelAllocInitiallyEmpty
Benchmark parallel Allocate, when the bitmap is mostly empty and we're allocating few values compared to the available allocations
plugins/allocators/bitmap/bitmap_test.go:101
Function
BenchmarkParallelAllocPartiallyFilled
(b *testing.B)
plugins/allocators/bitmap/bitmap_test.go:116
Function
ConfigErrorFromError
ConfigErrorFromError returns a ConfigError from the given error object.
config/errors.go:24
Function
ExampleAddPrefixes
()
plugins/allocators/ipcalc_test.go:39
Function
ExampleOffset
()
plugins/allocators/ipcalc_test.go:15
Method
Free
Free releases the given IP
plugins/allocators/bitmap/bitmap_ipv4.go:89
Method
Free
Free returns the given prefix to the available pool if it was taken.
plugins/allocators/bitmap/bitmap.go:92
Method
Free
(ip net.IPNet)
plugins/range/plugin_test.go:26
Method
Free
(ip net.IPNet)
plugins/range/plugin_test.go:40
Method
Handle
Handle processes DHCPv6 packets for the prefix plugin for a given allocator/leaseset
plugins/prefix/plugin.go:106
Function
Handler4
Handler4 handles DHCPv4 packets for the static routes plugin
plugins/staticroute/plugin.go:64
Function
Handler4
Handler4 handles DHCPv4 packets for the server_id plugin.
plugins/serverid/plugin.go:76
Function
Handler4
Handler4 handles DHCPv4 packets for the router plugin
plugins/router/plugin.go:46
Function
Handler4
Handler4 handles DHCPv4 packets for the lease_time plugin.
plugins/leasetime/plugin.go:31
next →
1–100 of 175, ranked by callers