21 lines
582 B
C
21 lines
582 B
C
//
|
|
// Created by HuangXin on 2023/5/17.
|
|
//
|
|
#include <string.h>
|
|
#include "zlog_module.h"
|
|
#include "common.h"
|
|
#include "db_interface.h"
|
|
|
|
int analyze_iptv_multicast_dev(const unsigned char *p, int UNUSED(size), const char *mac, U32 uid) {
|
|
char ipTvId[16] = {0};
|
|
memcpy(ipTvId, &p[4], 10);
|
|
|
|
if (strcmp(ipTvId, "JSCMCC-OTT") == 0) {
|
|
LOG_MOD(debug, ZM_DHCP, "Found IPTV %s of user %d\n", mac, uid);
|
|
db_iptv_add_device(uid, mac);
|
|
return TRUE;
|
|
}
|
|
|
|
LOG_MOD(trace, ZM_DHCP, "Device %s is not IPTV device of user %d\n", mac, uid);
|
|
return FALSE;
|
|
} |