Skip to content

Commit

Permalink
Merge pull request #126 from intelops/pre-main
Browse files Browse the repository at this point in the history
Pre main
  • Loading branch information
c-ravela authored Apr 12, 2024
2 parents 4fbd9ab + e1703f4 commit 7dcb666
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 2 deletions.
11 changes: 10 additions & 1 deletion pkg/eventparser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,16 @@ func (bs *ByteStream) parseSocketAddress() (any, error) {
return fmt.Sprintf("%+v", addr), nil
}
default:
return nil, nil
{
type unknownAddr struct {
Family string
}

var addr unknownAddr
addr.Family = socketFamilyNames[int32(family)]

return fmt.Sprintf("%+v", addr), nil
}
}
}

Expand Down
3 changes: 2 additions & 1 deletion pkg/eventparser/parser_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
package eventparser

import (
"fmt"
"reflect"
"testing"
)
Expand Down Expand Up @@ -440,7 +441,7 @@ func TestByteStream_parseSocketAddress(t *testing.T) {
position: 0,
nparams: 2,
},
want: nil,
want: fmt.Sprintf("%+v", struct{ Family string }{Family: "AF_UNSPEC"}),
wantErr: false,
},
{
Expand Down
3 changes: 3 additions & 0 deletions tarian/c/utils/shared/writer.h
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,9 @@ stain void write_sockaddr(uint8_t *buf, uint64_t *pos, unsigned long data_ptr, u
write_str(buf, pos, start_reading_point, MAX_UNIX_SOCKET_PATH, KERNEL);
break;
}
default: {
write_u8(buf, pos, socket_family);
}
}
}

Expand Down
Binary file modified tarian/tarian_x86_bpfel.o
Binary file not shown.

0 comments on commit 7dcb666

Please sign in to comment.