Skip to content

Commit

Permalink
retinaebpfapi#syscall#2
Browse files Browse the repository at this point in the history
  • Loading branch information
vpidatala94 committed Feb 22, 2025
1 parent 0b447d8 commit d7c83bc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions pkg/plugin/ebpfwindows/ebpf_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,8 +157,14 @@ func (p *Plugin) pullCiliumMetricsAndEvents(ctx context.Context) {
fmt.Println(entry.Name())
}
}
path := os.Getenv("PATH")
fmt.Println("PATH environment variable:", path)
oldPath := os.Getenv("PATH")
newPath := oldPath + "C:\\Program Files\\ebpf-for-windows\\"
fmt.Println("PATH environment variable:", newPath)
if err := os.Setenv("PATH", newPath); err != nil {
fmt.Println("Error setting PATH environment variable: %v")
} else {
fmt.Println("Path enniroment variable set to:", newPath)
}
err = eventsMap.RegisterForCallback(p.eventsMapCallback)
if err != nil {
p.l.Error("Error registering for events map callback", zap.Error(err))
Expand Down
2 changes: 1 addition & 1 deletion pkg/plugin/ebpfwindows/metricsmap_windows.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ type metricsMap struct {

var (
// Load the retinaebpfapi.dll
retinaEbpfApi = syscall.NewLazyDLL("C:\\hpc\\retinaebpfapi.dll")
retinaEbpfApi = syscall.NewLazyDLL("retinaebpfapi.dll")
// Load the enumerate_cilium_metricsmap function
enumMetricsMap = retinaEbpfApi.NewProc("enumerate_cilium_metricsmap")
)
Expand Down

0 comments on commit d7c83bc

Please sign in to comment.