Rename some fields

This commit is contained in:
emanuele-f 2021-07-04 15:44:48 +02:00
parent 4846a0b546
commit ad64716013
2 changed files with 3 additions and 3 deletions

View File

@ -40,7 +40,7 @@ typedef struct pcaprec_hdr_s {
uint32_t orig_len;
} __packed pcaprec_hdr_s;
#define CUSTOM_PCAP_MAGIC 0x01072021
#define PCAPDROID_TRAILER_MAGIC 0x01072021
/* A trailer to the packet which contains PCAPdroid-specific information.
* When pcapdroid_trailer is set, the raw packet will be prepended with a bogus ethernet header,
@ -52,7 +52,7 @@ typedef struct pcaprec_hdr_s {
*/
typedef struct pcapdroid_trailer {
uint32_t magic;
uint32_t uid;
int32_t uid;
char appname[20];
uint32_t fcs;
} __packed pcapdroid_trailer_t;

View File

@ -916,7 +916,7 @@ static void log_callback(int lvl, const char *line) {
void fill_custom_data(struct pcapdroid_trailer *cdata, vpnproxy_data_t *proxy, conn_data_t *conn) {
memset(cdata, 0, sizeof(*cdata));
cdata->magic = htonl(CUSTOM_PCAP_MAGIC);
cdata->magic = htonl(PCAPDROID_TRAILER_MAGIC);
cdata->uid = htonl(conn->uid);
get_appname_by_uid(proxy, conn->uid, cdata->appname, sizeof(cdata->appname));
}