123200Smckusick /* 239186Ssklower * Copyright (c) 1982, 1986, 1989 Regents of the University of California. 332789Sbostic * All rights reserved. 423200Smckusick * 544556Sbostic * %sccs.include.redist.c% 632789Sbostic * 7*57433Sandrew * @(#)udp_var.h 7.8 (Berkeley) 01/08/93 823200Smckusick */ 94895Swnj 104926Swnj /* 114926Swnj * UDP kernel structures and variables. 124926Swnj */ 134901Swnj struct udpiphdr { 144901Swnj struct ipovly ui_i; /* overlaid ip structure */ 154901Swnj struct udphdr ui_u; /* udp header */ 164901Swnj }; 174901Swnj #define ui_next ui_i.ih_next 184901Swnj #define ui_prev ui_i.ih_prev 194901Swnj #define ui_x1 ui_i.ih_x1 204901Swnj #define ui_pr ui_i.ih_pr 214901Swnj #define ui_len ui_i.ih_len 224901Swnj #define ui_src ui_i.ih_src 234901Swnj #define ui_dst ui_i.ih_dst 244901Swnj #define ui_sport ui_u.uh_sport 254901Swnj #define ui_dport ui_u.uh_dport 264901Swnj #define ui_ulen ui_u.uh_ulen 274901Swnj #define ui_sum ui_u.uh_sum 284901Swnj 294926Swnj struct udpstat { 3044377Skarels /* input statistics: */ 31*57433Sandrew u_long udps_ipackets; /* total input packets */ 32*57433Sandrew u_long udps_hdrops; /* packet shorter than header */ 33*57433Sandrew u_long udps_badsum; /* checksum error */ 34*57433Sandrew u_long udps_badlen; /* data length larger than packet */ 35*57433Sandrew u_long udps_noport; /* no socket on port */ 36*57433Sandrew u_long udps_noportbcast; /* of above, arrived as broadcast */ 37*57433Sandrew u_long udps_fullsock; /* not delivered, input socket full */ 38*57433Sandrew u_long udpps_pcbcachemiss; /* input packets missing pcb cache */ 3944377Skarels /* output statistics: */ 40*57433Sandrew u_long udps_opackets; /* total output packets */ 414926Swnj }; 424926Swnj 4344377Skarels #define UDP_TTL 30 /* default time to live for UDP packets */ 4426086Skarels 454901Swnj #ifdef KERNEL 464895Swnj struct inpcb udb; 474926Swnj struct udpstat udpstat; 484901Swnj #endif 49