Last change
on this file since 1667 was 821, checked in by Bruno Cornec, 18 years ago |
Addition of busybox 1.2.1 as a mindi-busybox new package
This should avoid delivering binary files in mindi not built there (Fedora and Debian are quite serious about that)
|
File size:
970 bytes
|
Rev | Line | |
---|
[821] | 1 | #ifndef _PACKET_H
|
---|
| 2 | #define _PACKET_H
|
---|
| 3 |
|
---|
| 4 | #include <netinet/udp.h>
|
---|
| 5 | #include <netinet/ip.h>
|
---|
| 6 |
|
---|
| 7 | struct dhcpMessage {
|
---|
| 8 | uint8_t op;
|
---|
| 9 | uint8_t htype;
|
---|
| 10 | uint8_t hlen;
|
---|
| 11 | uint8_t hops;
|
---|
| 12 | uint32_t xid;
|
---|
| 13 | uint16_t secs;
|
---|
| 14 | uint16_t flags;
|
---|
| 15 | uint32_t ciaddr;
|
---|
| 16 | uint32_t yiaddr;
|
---|
| 17 | uint32_t siaddr;
|
---|
| 18 | uint32_t giaddr;
|
---|
| 19 | uint8_t chaddr[16];
|
---|
| 20 | uint8_t sname[64];
|
---|
| 21 | uint8_t file[128];
|
---|
| 22 | uint32_t cookie;
|
---|
| 23 | uint8_t options[308]; /* 312 - cookie */
|
---|
| 24 | };
|
---|
| 25 |
|
---|
| 26 | struct udp_dhcp_packet {
|
---|
| 27 | struct iphdr ip;
|
---|
| 28 | struct udphdr udp;
|
---|
| 29 | struct dhcpMessage data;
|
---|
| 30 | };
|
---|
| 31 |
|
---|
| 32 | void udhcp_init_header(struct dhcpMessage *packet, char type);
|
---|
| 33 | int udhcp_get_packet(struct dhcpMessage *packet, int fd);
|
---|
| 34 | uint16_t udhcp_checksum(void *addr, int count);
|
---|
| 35 | int udhcp_raw_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
|
---|
| 36 | uint32_t dest_ip, int dest_port, uint8_t *dest_arp, int ifindex);
|
---|
| 37 | int udhcp_kernel_packet(struct dhcpMessage *payload, uint32_t source_ip, int source_port,
|
---|
| 38 | uint32_t dest_ip, int dest_port);
|
---|
| 39 |
|
---|
| 40 |
|
---|
| 41 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.