summaryrefslogtreecommitdiff
path: root/net/udp.h
blob: 85aa248ef470f55dfb4ad3540343b066804bc5a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include <stdint.h>
#include "netdev.h"

struct udp_v4{
    uint16_t src_port;
    uint16_t dst_port;
    uint16_t len;
    uint16_t csum;
} __attribute__((packed));

uint32_t udp_generic(struct netdev *dev, uint32_t ip, uint16_t src, uint16_t dst, uint8_t* pos,uint8_t *end);