$ ! © Copyright 1976, 2004 Hewlett-Packard Development Company, L.P. $ ! $ ! Confidential computer software. Valid license from HP and/or its $ ! subsidiaries required for possession, use, or copying. $ ! $ ! Consistent with FAR 12.211 and 12.212, Commercial Computer Software, $ ! Computer Software Documentation, and Technical Data for Commercial $ ! Items are licensed to the U.S. Government under vendor's standard $ ! commercial license. $ ! $ ! Neither HP nor any of its subsidiaries shall be liable for technical $ ! or editorial errors or omissions contained herein. The information $ ! in this document is provided "as is" without warranty of any kind $ ! and is subject to change without notice. The warranties for HP $ ! products are set forth in the express limited warranty statements $ ! accompanying such products. Nothing herein should be construed as $ ! constituting an additional warranty. $! $! Command procedure to compile and link testpcap examples $! $! Creation Date: 17-Mar-2004 $! Last modified: 18-Jun-2004 $! $! Preprocess parmeters $! $ P1 = f$edit(P1, "COLLAPSE,UPCASE") $ P2 = f$edit(P2, "COLLAPSE,UPCASE") $! $! if p2 is blank then this could be caused by p1 missing $! or p2 missing, so check p1 for its unique values and $! if there p2 is missing. $! $ if (P2 .eqs. "") .or. (P2 .eqs. "*") $ then $! need to determine which parameter is missing $ if (P1 .eqs. "DEBUG") .or. (P1 .eqs. "CLEAN") $ then $! P2 is missing $! Can't compile with out a filename $ goto error $ else $! P1 is missing $ P2 = P1 $ P1 = "" $ endif $ endif $ if (P1 .eqs."") .and. (P2 .eqs. "") then goto error $ $! write sys$output "" $! write sys$output "@BUILD_TESTPCAP called with P1 = """+p1+""", P2 = """+p2+"""" $! write sys$output "" $ $ if p1 .eqs. "" $ then $ write sys$output "Building "+p2+" ..." $ options="" $ link_options="" $ else $ if p1 .eqs. "DEBUG" $ then $ write sys$output "Building (with debug) "+p2+" ..." $ options="/debug/noopt" $ link_options = "/debug" $ else $ if p1 .eqs. "CLEAN" $ then $ write sys$output "Purging versions of object files and images "+p2+" ..." $ purge 'p2'.obj $ purge 'p2'.exe $ exit $ endif $ endif $ endif $ $! $! Setup location of headers $! $ include = f$trnlnm("SYS$DISK")+f$directory() $ define/nolog net 'include' $ define/nolog netinet 'include' $ define/nolog kern 'include' $! $! Definitions $! $ defines == "(ETHER_HDR_LEN=14, ETHER_ADDR_LEN=6)" $! $! Compile and link $! $ cc 'options' /define='defines' /warning=disable=MACROREDEF /name=as_is/include=tcpip$examples 'p2' $ link 'link_options' 'p2',pcap/opt/sysexe $! $! Setup foreign command $! $ 'p2' :== $'include''p2'.exe $ exit $error: $ write sys$output "Syntax: buildpcap [] " $ exit