Hello, thanks for the project.
Unfortunately I can't get the most recent version to work on my Arch Linux machine (`6.18.7` kernel). The installed executable with `install.sh` (as per instructions) fails with the following message: `Failed to open config file '/etc/pcktbatch/conf.json'`. This also applies to local absolute config paths passed with `-c`. Running with / without `sudo` doesn't make a difference. Here's a sample config I used for testing:
```json
{
"interface": "lo",
"sequences": [
{
"eth": {
"smac": "00:11:22:33:44:55",
"dmac": "aa:bb:cc:dd:ee:ff"
},
"ip": {
"sip": "127.0.0.1",
"dip": "127.0.0.1",
"protocol": "tcp"
},
"tcp": {
"dport": 443
}
}
]
}
```
I also tried minifying it (compressing multi-line json to one line) without luck. Can you track down the issue? Or is my config wrong? There aren't any JSON examples, only old YAML ones, which could have been useful. Hope you can help :)
Hey, I'm sorry for the really late reply!
I've tested your config on my VM and the config is parsed without any issues.
I've just pushed a commit that improves config error handling and when it fails, it should give you the JSON-specific error. I thought I had this implemented already, but I overlooked it when refactoring code.
Example:
```bash
christian@x-dev2:~/packet-batch/Program$ sudo pcktbatch -c ./local.json -v
Running AF_XDP sockets with batch size => 64.
Failed to open config file './local.json': json_tokener_parse_ex failed: object value separator ',' expected
```
If you're still having issues, please rebuild and retry to receive a more helpful error.
My bad, seems like the beautifier I used to format the config above fixed my error, where I forgot a ',' between "sip" and "dip". The new output does in fact give more information about the parsing issue and I was able to quickly find the cause. Thanks!