Lines Matching +defs:user +defs:t
41 * header doesn't define pcap_if_t, meaning that we can't actually *use*
104 * those versions of libpcap, don't require it.)
204 * This is a horrible hack; newer versions of libpcap don't import
220 static int pflag; /* don't go promiscuous */
341 * We don't have pcap_set_parser_debug() in libpcap, but we do have
470 * monitor mode, if -I wasn't specified, or when in monitor mode,
620 * and those expressions aren't accepted by macOS tcpdump, but the
688 * specified matters, such as -v and -d and -t, should probably not
693 * doesn't make sense; it should be --verbosity={N} or something such
787 error("Couldn't chroot/chdir to '%.64s': %s",
801 error("Couldn't change to '%.32s' uid=%lu gid=%lu: %s",
811 error("Couldn't find user '%.32s'", username);
813 /* We don't need CAP_SETUID, CAP_SETGID and CAP_SYS_CHROOT anymore. */
863 * value of 0 isn't necessarily failure; if orig_name is an empty
872 * value will only be 0 if the formatted date doesn't fit
875 * (We check above because, even if we don't use -G, we
989 * AT&T's decision, means that "fcntl-ing" isn't a thing, but a motley
1013 * using it, so that Capsicum-capable tcpdump wouldn't need to do
1022 * seeking should be allowed, so that tcpdump doesn't need to know
1095 error("can't open %s: %s", fname, pcap_strerror(errno));
1098 error("can't stat %s: %s", fname, pcap_strerror(errno));
1101 * Reject files whose size doesn't fit into an int; a filter
1291 * the interface doesn't exist; return NULL, so that
1311 * the interface doesn't exist; return NULL, so that
1326 error("%s: Can't set %ssecond time stamp precision: %s",
1336 error("%s: Can't set immediate mode: %s",
1354 error("%s: Can't set snapshot length: %s",
1359 error("%s: Can't set promiscuous mode: %s",
1364 error("%s: Can't set monitor mode: %s",
1374 error("%s: Can't set buffer size: %s",
1381 error("%s: Can't set time stamp type: %s",
1471 * the interface doesn't exist; return NULL, so that
1559 * On platforms where the CPU doesn't support unaligned loads,
1676 error("%s: can't get current time: %s",
1807 case 't':
1997 error("only -t, -tt, -ttt, -tttt and -ttttt are supported");
2011 * than 1 second, as the user's probably expecting to see packets
2052 * We don't need network access, so relinquish any set-UID
2056 * trace file, as that might let the user read other
2115 * the user-specified value if supplied.
2189 * couldn't be found.
2197 * We can't get a list of interfaces; just
2205 * Let user own process after capture device has
2226 * We don't actually support changing the
2249 * that doesn't support DLT_LINUX_SLL2.
2329 * If a user name was specified with "-Z", attempt to switch to
2330 * that user's UID. This would probably be used with sudo,
2333 * devices, and can't just give users that permission,
2336 * Tcpdump doesn't necessarily write only to one savefile;
2338 * savefiles as the user under whose UID it's run, rather
2339 * than as the user specified with -Z, would thus be to switch
2340 * to the original user ID before opening a capture file and
2341 * then switch back to the -Z user ID after opening the savefile.
2342 * Switching to the -Z user ID only after opening the first
2343 * savefile doesn't handle the general case.
2416 /* We do not need numbering for dumpfiles if Cflag isn't set. */
2445 * and they do since FreeBSD 12.0, but they didn't before.
2525 * We can't get statistics when reading from a file rather
2537 * When capturing to a file, if "--print" wasn't specified,
2550 * I don't know what a "long wait" is, but we'll assume
2617 * so it doesn't get intermingled with error output.
2621 * We got interrupted, so perhaps we didn't
2680 * don't support multiple
2798 * the ANSI C standard doesn't say it is).
2803 * We don't have "pcap_breakloop()"; this isn't safe, but
2810 * We got interrupted, so perhaps we didn't
2840 * Older versions of libpcap didn't set ps_ifdrop on some
2904 * Set to lowest priority so that this doesn't disturb the capture.
2933 dump_packet_and_trunc(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
2941 dump_info = (struct dump_info *)user;
2944 * XXX - this won't force the file to rotate on the specified time
2953 time_t t;
2956 if ((t = time(NULL)) == (time_t)-1) {
2957 error("%s: can't get current_time: %s",
2963 if (t - Gflag_time >= Gflag) {
2970 Gflag_time = t;
2979 * Compress the file we just closed, if the user asked for it
3002 * Gflag was set otherwise we wouldn't be here. Reset the count
3011 * We also don't need numbering if Cflag is not set.
3053 * XXX - this won't prevent capture files from getting
3084 * Compress the file we just closed, if the user
3148 dump_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
3156 dump_info = (struct dump_info *)user;
3173 print_packet(u_char *user, const struct pcap_pkthdr *h, const u_char *sp)
3180 pretty_print_packet((netdissect_options *)user, h, sp, packets_captured);
3284 "\t\t[ -C file_size ] [ -E algo:secret ] [ -F file ] [ -G seconds ]\n");
3286 "\t\t[ -i interface ]" IMMEDIATE_MODE_USAGE j_FLAG_USAGE "\n");
3289 "\t\t" LIST_REMOTE_INTERFACES_USAGE "\n");
3293 "\t\t" m_FLAG_USAGE "\n");
3296 "\t\t[ -M secret ] [ --number ] [ --print ]" Q_FLAG_USAGE "\n");
3298 "\t\t[ -r file ] [ -s snaplen ] [ -T type ] [ --version ]\n");
3300 "\t\t[ -V file ] [ -w file ] [ -W filecount ] [ -y datalinktype ]\n");
3303 "\t\t[ --time-stamp-precision precision ] [ --micro ] [ --nano ]\n");
3306 "\t\t[ -z postrotate-command ] [ -Z user ] [ expression ]\n");