-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
163 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,5 +6,6 @@ | |
#include "bpf_helpers.h" | ||
#include "bpf_tracing.h" | ||
#include "bpf_map.h" | ||
#include "notes.h" | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
#ifndef _NOTES_H__ | ||
#define _NOTES_H__ | ||
|
||
#define NOTE_C 262 | ||
#define NOTE_CS 277 | ||
#define NOTE_D 294 | ||
#define NOTE_DS 311 | ||
#define NOTE_E 330 | ||
#define NOTE_F 349 | ||
#define NOTE_FS 370 | ||
#define NOTE_G 392 | ||
#define NOTE_GS 415 | ||
#define NOTE_A 440 | ||
#define NOTE_AS 466 | ||
#define NOTE_B 494 | ||
|
||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package main | ||
|
||
import ( | ||
"encoding/binary" | ||
"unsafe" | ||
) | ||
|
||
var ByteOrder binary.ByteOrder | ||
|
||
func init() { | ||
ByteOrder = getHostByteOrder() | ||
} | ||
|
||
// getHostByteOrder - Returns the host byte order | ||
func getHostByteOrder() binary.ByteOrder { | ||
var i int32 = 0x01020304 | ||
u := unsafe.Pointer(&i) | ||
pb := (*byte)(u) | ||
b := *pb | ||
if b == 0x04 { | ||
return binary.LittleEndian | ||
} | ||
|
||
return binary.BigEndian | ||
} |