123200Smckusick /* 2*39186Ssklower * Copyright (c) 1982, 1986, 1989 Regents of the University of California. 332789Sbostic * All rights reserved. 423200Smckusick * 532789Sbostic * Redistribution and use in source and binary forms are permitted 634855Sbostic * provided that the above copyright notice and this paragraph are 734855Sbostic * duplicated in all such forms and that any documentation, 834855Sbostic * advertising materials, and other materials related to such 934855Sbostic * distribution and use acknowledge that the software was developed 1034855Sbostic * by the University of California, Berkeley. The name of the 1134855Sbostic * University may not be used to endorse or promote products derived 1234855Sbostic * from this software without specific prior written permission. 1334855Sbostic * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 1434855Sbostic * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 1534855Sbostic * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 1632789Sbostic * 17*39186Ssklower * @(#)udp_var.h 7.5 (Berkeley) 09/20/89 1823200Smckusick */ 194895Swnj 204926Swnj /* 214926Swnj * UDP kernel structures and variables. 224926Swnj */ 234901Swnj struct udpiphdr { 244901Swnj struct ipovly ui_i; /* overlaid ip structure */ 254901Swnj struct udphdr ui_u; /* udp header */ 264901Swnj }; 274901Swnj #define ui_next ui_i.ih_next 284901Swnj #define ui_prev ui_i.ih_prev 294901Swnj #define ui_x1 ui_i.ih_x1 304901Swnj #define ui_pr ui_i.ih_pr 314901Swnj #define ui_len ui_i.ih_len 324901Swnj #define ui_src ui_i.ih_src 334901Swnj #define ui_dst ui_i.ih_dst 344901Swnj #define ui_sport ui_u.uh_sport 354901Swnj #define ui_dport ui_u.uh_dport 364901Swnj #define ui_ulen ui_u.uh_ulen 374901Swnj #define ui_sum ui_u.uh_sum 384901Swnj 394926Swnj struct udpstat { 404926Swnj int udps_hdrops; 414926Swnj int udps_badsum; 424926Swnj int udps_badlen; 43*39186Ssklower int udps_noport; 44*39186Ssklower int udps_ipackets; 45*39186Ssklower int udps_opackets; 464926Swnj }; 474926Swnj 4831398Skarels #define UDP_TTL 30 /* deflt time to live for UDP packets */ 4926086Skarels 504901Swnj #ifdef KERNEL 514895Swnj struct inpcb udb; 524926Swnj struct udpstat udpstat; 534901Swnj #endif 54