17c478bd9Sstevel@tonic-gate #ifndef _UDP_H 27c478bd9Sstevel@tonic-gate #define _UDP_H 37c478bd9Sstevel@tonic-gate 47c478bd9Sstevel@tonic-gate /* We need 'uint16_t' and 'uint8_t' */ 57c478bd9Sstevel@tonic-gate #include "types.h" 67c478bd9Sstevel@tonic-gate /* We need 'in_addr' */ 77c478bd9Sstevel@tonic-gate #include "in.h" 87c478bd9Sstevel@tonic-gate 97c478bd9Sstevel@tonic-gate struct udp_pseudo_hdr { 107c478bd9Sstevel@tonic-gate in_addr src; 117c478bd9Sstevel@tonic-gate in_addr dest; 127c478bd9Sstevel@tonic-gate uint8_t unused; 137c478bd9Sstevel@tonic-gate uint8_t protocol; 147c478bd9Sstevel@tonic-gate uint16_t len; 157c478bd9Sstevel@tonic-gate }; 167c478bd9Sstevel@tonic-gate struct udphdr { 177c478bd9Sstevel@tonic-gate uint16_t src; 187c478bd9Sstevel@tonic-gate uint16_t dest; 197c478bd9Sstevel@tonic-gate uint16_t len; 207c478bd9Sstevel@tonic-gate uint16_t chksum; 217c478bd9Sstevel@tonic-gate }; 227c478bd9Sstevel@tonic-gate 237c478bd9Sstevel@tonic-gate extern void build_udp_hdr(unsigned long __destip, unsigned int __srcsock, 247c478bd9Sstevel@tonic-gate unsigned int __destsock, int __ttl, int __len, 257c478bd9Sstevel@tonic-gate const void * __buf); 267c478bd9Sstevel@tonic-gate 277c478bd9Sstevel@tonic-gate extern int udp_transmit(unsigned long __destip, unsigned int __srcsock, 287c478bd9Sstevel@tonic-gate unsigned int __destsock, int __len, const void * __buf); 297c478bd9Sstevel@tonic-gate 307c478bd9Sstevel@tonic-gate #endif /* _UDP_H */ 31