iovisor / iovisor/bcc

Parsing GRE packets to get inner IPv4 original source and destr addresses

Open
#4,153 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
22.7k
Forks
4.1k
Avg merge
10d 4h
Merged PRs (30d)
3

Description

Hi,

I was trying to find an example of GRE packet inspection but couldn't find one. I'm trying to get the original IPv4 source and destination addresses.

```
int incoming(struct __sk_buff *skb)
{
void *data = (void *)(long)skb->data;
void *data_end = (void *)(long)skb->data_end;

struct iphdr *inner_ip; <--- Need this

return TC_ACT_OK;
}
```

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.