MCPcopy Create free account

hub / github.com/andrey-vk/wdbgp / functions

Functions1,274 in github.com/andrey-vk/wdbgp

↓ 2 callersMethodstartLocked
(ctx context.Context)
internal/bgp/manager.go:118
↓ 2 callersFunctionsubtract
(prefix, denied netip.Prefix)
internal/prefixfilter/filter.go:66
↓ 2 callersFunctionsyncLoop
(ctx context.Context, interval time.Duration, syncer *feeds.Syncer, manager *bgp.Manager, db *store.Store, s *
cmd/wdbgp/main.go:248
↓ 2 callersMethodsyncOne
(ctx context.Context, feed store.Feed)
internal/feeds/feeds.go:223
↓ 2 callersFunctionv033EncodeAddr
(value string)
internal/store/migrations/033_binary_users.go:375
↓ 2 callersFunctionv033EncodePrefix
(value string)
internal/store/migrations/033_binary_users.go:383
↓ 2 callersFunctionv034ColumnHasType
(ctx context.Context, db *sql.DB, table, column, declaredType string)
internal/store/migrations/034_epoch_timestamps_drop_mode_key.go:197
↓ 2 callersFunctionv034FinishIfMissing
v034FinishIfMissing handles the type-detected tables when they don't exist at all: either a previous run crashed between DROP and RENAME (finish the r
internal/store/migrations/034_epoch_timestamps_drop_mode_key.go:176
↓ 2 callersFunctionvalidateNetworksNormalized
validateNetworksNormalized rejects a networks list that isn't already the minimal, masked, deduplicated, fully-merged form store.AggregateNetworks wou
internal/web/handlers_api_users.go:38
↓ 2 callersFunctionvalidateNonEmptySecret
validateNonEmptySecret rejects an empty value for the admin_password/ session_secret settings. Their underlying Setting has no validate hook of its ow
internal/web/handlers_api_settings.go:393
↓ 2 callersMethodvalidatePeerUniqueness
validatePeerUniqueness validates a user's BGP peer configuration against existing peers. skipUserID is the user's own ID (0 for new users). Step A: Sa
internal/web/handlers_admin_users.go:16
↓ 2 callersFunctionwebAuthToInt
(mode string)
internal/store/users.go:72
↓ 1 callersMethodAccept
Accept handles a passive BGP connection. Reads the OPEN, validates, then delegates to AcceptWithOpen.
internal/bgp/peer_fsm.go:349
↓ 1 callersMethodAddPeer
(ctx context.Context, user store.User)
internal/bgp/manager.go:219
↓ 1 callersMethodAddPeer
(context.Context, store.User)
internal/web/types.go:19
↓ 1 callersMethodAnnounceRoutes
AnnounceRoutes stores routes and triggers an update if the session is established.
internal/bgp/peer_routes.go:68
↓ 1 callersMethodApplyUserRouteFilters
( ctx context.Context, user User, prefixes []netip.Prefix, )
internal/store/routes.go:219
↓ 1 callersFunctionAutoCommunity
AutoCommunity returns the auto-generated community number for a given service position within a group. This is a positional estimate used for UI displ
internal/store/communities.go:31
↓ 1 callersFunctionAutoGroupCommunity
AutoGroupCommunity returns the auto-generated community number for a category's own group-level entry — the group base itself (e.g. 10000 for the firs
internal/store/communities.go:43
↓ 1 callersMethodCategoryPrefixCounts
CategoryPrefixCounts returns the number of distinct IPv4 and IPv6 CIDRs per category.
internal/store/catalog.go:93
↓ 1 callersFunctionConfigure
Configure configures the default logger based on configuration
internal/logging/logging.go:36
↓ 1 callersFunctionDebug
Helper functions for common log operations
internal/logging/logging.go:127
↓ 1 callersMethodDeleteCatalogMode
(ctx context.Context, id int64)
internal/store/modes.go:76
↓ 1 callersMethodDeleteCommunity
DeleteCommunity removes a manual community override. After deletion, GenerateCommunities fills the auto value.
internal/store/communities.go:112
↓ 1 callersMethodDeletePeer
(ctx context.Context, peerIP string, userID int64)
internal/bgp/manager.go:336
↓ 1 callersMethodDeleteUser
(ctx context.Context, id int64)
internal/store/users.go:452
↓ 1 callersFunctionDistFS
DistFS returns an fs.FS rooted at webgui/dist for use with http.FileServerFS.
internal/spa/spa.go:17
↓ 1 callersMethodEnabledCatalogPrefixes
(ctx context.Context, modeID int64)
internal/store/catalog.go:54
↓ 1 callersFunctionEncodeAddr
The refactored schema stores IP data in binary form: an address is a 4- or 16-byte BLOB (family implicit in the length), a prefix is such a BLOB plus
internal/store/ipcodec.go:15
↓ 1 callersFunctionEncodeAddrString
EncodeAddrString parses and encodes a textual address in one step, for use as a query argument against BLOB address columns.
internal/store/ipcodec.go:50
↓ 1 callersFunctionFatal
(msg string, args ...any)
internal/logging/logging.go:143
↓ 1 callersMethodFeedModes
FeedModes returns the mode IDs associated with a feed.
internal/store/feeds.go:226
↓ 1 callersMethodGet
Get returns an existing circuit breaker or nil.
internal/retry/circuitbreaker.go:268
↓ 1 callersMethodGetAllSettings
GetAllSettings returns all rows from app_settings as a map[key]value.
internal/store/settings.go:17
↓ 1 callersFunctionHTTPMiddleware
HTTPMiddleware creates middleware that adds request ID and logger to context
internal/logging/logging.go:182
↓ 1 callersFunctionHTTPTransientError
HTTPTransientError returns true for HTTP errors that are likely transient.
internal/retry/retry.go:95
↓ 1 callersFunctionMetadataURL
(rawURL string)
internal/feeds/feeds.go:380
↓ 1 callersMethodMigrate
(ctx context.Context)
internal/store/store.go:272
↓ 1 callersFunctionNew
New creates a new structured error.
internal/errors/errors.go:44
↓ 1 callersMethodPurgeFeedSnapshots
PurgeFeedSnapshots deletes feed snapshots older than N days, keeping the newest record just outside the window.
internal/store/snapshots.go:273
↓ 1 callersMethodQueryContext
(context.Context, string, ...any)
internal/store/dictionaries.go:30
↓ 1 callersMethodReconcile
(ctx context.Context)
internal/bgp/manager.go:213
↓ 1 callersMethodReloadPeers
(context.Context)
internal/web/types.go:17
↓ 1 callersFunctionRequestIDFromContext
RequestIDFromContext extracts request ID from context
internal/logging/logging.go:111
↓ 1 callersMethodReset
Reset resets the circuit breaker to closed state.
internal/retry/circuitbreaker.go:143
↓ 1 callersMethodResetAll
ResetAll resets all circuit breakers.
internal/retry/circuitbreaker.go:275
↓ 1 callersMethodSerialize
()
internal/bgp/wire_types.go:76
↓ 1 callersMethodSetUserFilterOverride
(ctx context.Context, userID int64, enabled bool)
internal/store/routes.go:383
↓ 1 callersMethodSetUserRouteFilterConfig
(ctx context.Context, userID int64, mode string, filters RouteFilters)
internal/store/routes.go:356
↓ 1 callersFunctionSetVisibleUserModeSelection
( ctx context.Context, tx *sql.Tx, userID int64, modeID int64, categories []string, services []ServiceKe
internal/store/users.go:705
↓ 1 callersFunctionSetVisibleUserSelection
( ctx context.Context, tx *sql.Tx, userID int64, categories []string, services []ServiceKey, )
internal/store/users.go:694
↓ 1 callersMethodStatus
Status reports whether a BGP speaker is currently running, and the error from the last failed Start/ReloadPeers attempt (nil when running is true).
internal/web/types.go:25
↓ 1 callersMethodTestAdapter
( ctx context.Context, feed store.Feed, adapter store.FeedAdapter, )
internal/feeds/feeds.go:191
↓ 1 callersMethodTimeout
()
internal/feeds/retry_integration_test.go:132
↓ 1 callersMethodTriggerUpdate
()
internal/bgp/peer_routes.go:8
↓ 1 callersMethodUpdatePeer
(context.Context, store.User)
internal/web/types.go:20
↓ 1 callersMethodUserSelection
( ctx context.Context, userID int64, )
internal/store/users.go:542
↓ 1 callersMethodValidate
Validate reports whether v would be accepted by Set, without persisting or mutating anything.
internal/settings/setting.go:225
↓ 1 callersMethodValidate
Validate reports whether v would be accepted by Set, without persisting or mutating anything.
internal/settings/setting.go:274
↓ 1 callersFunctionValidateHost
ValidateHost checks that a listen-address host doesn't have a port accidentally embedded in it (a common typo: WDBGP_HOST=0.0.0.0:8080 instead of sett
internal/settings/settings.go:571
↓ 1 callersMethodWithdrawRoutes
WithdrawRoutes sends withdrawals for the given prefixes over an established session.
internal/bgp/peer_routes.go:83
↓ 1 callersMethodWriteHeader
(statusCode int)
internal/logging/logging.go:238
↓ 1 callersMethodacceptLoop
acceptLoop accepts incoming connections.
internal/bgp/speaker.go:230
↓ 1 callersFunctionaddrInteger
(addr netip.Addr)
internal/web/cidr_debug.go:194
↓ 1 callersMethodadminRateLimitMiddleware
adminRateLimitMiddleware applies rate limiting to admin endpoints
internal/web/middleware.go:247
↓ 1 callersMethodallUserRouteFilters
allUserRouteFilters fetches all user route filters in a single query
internal/store/routes.go:299
↓ 1 callersMethodapiAdaptersDelete
(w http.ResponseWriter, r *http.Request)
internal/web/handlers_api_adapters.go:164
↓ 1 callersMethodapiFeedsSyncAll
(w http.ResponseWriter, r *http.Request)
internal/web/handlers_api_feeds.go:273
↓ 1 callersMethodapiModeCommunitiesPut
apiModeCommunitiesPut handles PUT /api/admin/modes/{id}/communities.
internal/web/handlers_api_modes.go:394
↓ 1 callersMethodapiModeCommunitiesReset
apiModeCommunitiesReset handles POST /api/admin/modes/{id}/communities/reset.
internal/web/handlers_api_modes.go:455
↓ 1 callersMethodapiUserCredentialsDelete
apiUserCredentialsDelete handles DELETE /api/admin/users/{id}/credentials. Uses request body {login: "..."} to identify the credential to delete.
internal/web/handlers_api_users.go:845
↓ 1 callersMethodapiUserLogin
apiUserLogin handles POST /api/user/login. Authenticates a user by login credentials and sets a session cookie.
internal/web/handlers_api_user.go:193
↓ 1 callersMethodapiUserLogout
apiUserLogout handles POST /api/user/logout. Clears the user session cookie.
internal/web/handlers_api_user.go:328
↓ 1 callersMethodapiUserStatuses
apiUserStatuses handles GET /api/admin/users/statuses. Returns raw BGP peer states keyed by "ip:asn" for the frontend to match against user data.
internal/web/handlers_api_users.go:899
↓ 1 callersMethodapplyUserRouteFilters
( ctx context.Context, userID int64, filterMode string, prefixes []netip.Prefix, globalFilters RouteFilte
internal/store/routes.go:232
↓ 1 callersFunctionautoGenerateCommunities
autoGenerateCommunities fills communities for all existing catalog data.
internal/store/migrations/013_catalog_communities.go:27
↓ 1 callersFunctionbigIntToAddr
(v *big.Int, is4 bool)
internal/prefixfilter/aggregate.go:145
↓ 1 callersFunctionbuildVersion32DB
buildVersion32DB creates a database migrated through version 32 (users still text-based) with representative user data, and returns its path.
internal/store/033_binary_users_test.go:16
↓ 1 callersFunctioncallUint16Setting
(ctx context.Context, st settings.Setting[uint16, uint16], raw json.RawMessage)
internal/web/handlers_api_settings.go:522
↓ 1 callersFunctioncallUint16Validate
(st settings.Setting[uint16, uint16], raw json.RawMessage)
internal/web/handlers_api_settings.go:562
↓ 1 callersFunctioncallUint32Setting
(ctx context.Context, st settings.Setting[uint32, uint32], raw json.RawMessage)
internal/web/handlers_api_settings.go:530
↓ 1 callersFunctioncallUint32Validate
(st settings.Setting[uint32, uint32], raw json.RawMessage)
internal/web/handlers_api_settings.go:570
↓ 1 callersFunctionchildren
(prefix netip.Prefix)
internal/prefixfilter/filter.go:98
↓ 1 callersFunctionclearListenerMD5
clearListenerMD5 removes TCP MD5 keys from the listener socket for the given peers (those with passwords set). Used when peer configs change to remove
internal/bgp/md5.go:116
↓ 1 callersFunctionclearTCPMD5OnFd
clearTCPMD5OnFd removes a TCP MD5 signature for the given address from a socket. On Linux, calling SetsockoptTCPMD5Sig with a zero-length key deletes
internal/bgp/md5.go:97
↓ 1 callersFunctioncommunitiesEqual
(a, b []LargeCommunity)
internal/bgp/manager.go:570
↓ 1 callersMethodconnectAndRun
()
internal/bgp/peer_fsm.go:95
↓ 1 callersFunctioncontains
contains checks if string contains substring (case-insensitive).
internal/retry/retry.go:234
↓ 1 callersFunctioncontainsID
(ids []int64, target int64)
internal/bgp/manager.go:536
↓ 1 callersFunctioncountEnabledFeeds
(feeds []store.Feed)
internal/web/helpers.go:7
↓ 1 callersMethoddebugCIDR
( ctx context.Context, raw string, modeIDs ...int64, )
internal/web/cidr_debug.go:38
↓ 1 callersFunctiondecodeASPath
decodeASPath decodes an AS_PATH attribute value. Parses AS_SEQUENCE segments (type 1 = 2-byte, type 2 = 4-byte). Returns the first ASN from the first
internal/bgp/wire_decode.go:353
↓ 1 callersFunctiondecodeHeader
decodeHeader parses a BGP message header from wire format.
internal/bgp/wire_decode.go:11
↓ 1 callersFunctiondecodeMpReachNLRI
decodeMpReachNLRI decodes an MP_REACH_NLRI attribute value.
internal/bgp/wire_decode.go:292
↓ 1 callersFunctiondecodeMpUnreachNLRI
decodeMpUnreachNLRI decodes an MP_UNREACH_NLRI attribute value. Format: AFI(2) + SAFI(1) + NLRI (no next hop, no SNP).
internal/bgp/wire_decode.go:332
↓ 1 callersFunctiondecodeNLRIFromAttr
decodeNLRIFromAttr extracts NLRI from path attributes, collecting both legacy UPDATE.NLRI and NLRI from MP_REACH attributes (RFC 4760).
internal/bgp/wire_test.go:822
↓ 1 callersFunctiondecodeNotification
decodeNotification parses a NOTIFICATION message body.
internal/bgp/wire_decode.go:186
↓ 1 callersFunctiondecodeOpen
decodeOpen parses an OPEN message body.
internal/bgp/wire_decode.go:74
↓ 1 callersFunctiondecodePathAttribute
decodePathAttribute decodes a single path attribute value by type. Returns (nil, nil) for unknown optional attributes, which are skipped.
internal/bgp/wire_decode.go:241
↓ 1 callersFunctiondecodeUpdate
decodeUpdate parses an UPDATE message body.
internal/bgp/wire_decode.go:139
← previousnext →401–500 of 1,274, ranked by callers