mirror of
https://github.com/emanuele-f/PCAPdroid.git
synced 2026-07-06 21:11:15 +08:00
Rename some fields
This commit is contained in:
parent
4846a0b546
commit
ad64716013
@ -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;
|
||||
|
||||
@ -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));
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user