c - How to long value compare?
问题描述
BUF->src has like a 37848238928 number. But I want to filter with this if(BUF->src==279383903) serialprint("fine") but it cant be because BUF struct and my number is long how can I compare with these number in if blocks?
Buffer:
#define BUF ((struct uip_eth_hdr *)&uip_buf[0])
struct uip_eth_hdr
{
struct uip_eth_addr dest;
struct uip_eth_addr src;
uint16_t type;
};
struct uip_eth_addr
{
uint8_t addr[6];
};
解决方案
推荐阅读
- python-3.x - 使用 boto3 在 Dynamo 中按分区键查询所有项目
- bash - 在 bash 脚本中处理一组 git 命令
- php - 如何使用 kartik mpdf 扩展强制 PDF 在 Yii2 中打开
- java - 在 Java 中,如何在评估 emptyConstructor 条件时区别对待空类构造函数?
- c# - 在 Pcap.Net 中实现 TCP/UDP 数据包的 IP 分片
- python - 如何在 Python 文件中的函数前添加一行
- mysql - Rails:通过连接表查询两步关系+有很多关系
- c# - 创建多个 IBM Watson 服务
- java - 如何使用groovy从soapui Json Response构造JsonPath?
- spring-boot - zuul(没有尤里卡) - 总是以“转发错误”结束