vcpe/srcs/service/dhcpd/include/rfc2131.h

36 lines
660 B
C
Raw Normal View History

//
// Created by xajhuang on 2023/4/20.
//
#ifndef VCPE_RFC2131_H
#define VCPE_RFC2131_H
#include <linux/if_ether.h>
#include "common.h"
#ifdef __cplusplus
extern "C" {
#endif
#define DHCP_COOKIE_VAL (0x63825363)
#define MAX_DHCP_PKG_SIZE (512)
#define VLAN_VNI_ID(x) ntohs((x))
#define DHCP_XID(x) ntohl((x))
#define DHCP_CLI_PORT (68)
#define DHCP_SVR_PORT (67)
typedef struct {
U8 unicast;
U8 cliMac[ETH_ALEN];
U32 xid;
U32 reqIpAddr;
U32 leaseTime;
char clientId[256];
char vendorClassId[256];
char hostName[256];
} DHCP_REQ, *PDHCP_REQ;
#ifdef __cplusplus
}
#endif
#endif //VCPE_RFC2131_H