Lines Matching +defs:source +defs:path

6  * Redistribution and use in source and binary forms, with or without
10 * 1. Redistributions of source code must retain the above copyright
73 int pcap_findalldevs_ex(const char *source, struct pcap_rmtauth *auth, pcap_if_t **alldevs, char *errbuf)
76 char name[PCAP_BUF_SIZE], path[PCAP_BUF_SIZE], filename[PCAP_BUF_SIZE];
88 if (strlen(source) > PCAP_BUF_SIZE)
90 snprintf(errbuf, PCAP_ERRBUF_SIZE, "The source string is too long. Cannot handle it correctly.");
95 * Determine the type of the source (file, local, remote)
100 * to use a first time this function to get the source type, and a second time to get the appropriate
101 * info, which depends on the source type.
103 if (pcap_parsesrcstr(source, &type, NULL, NULL, NULL, errbuf) == -1)
109 if (pcap_parsesrcstr(source, &type, NULL, NULL, NULL, errbuf) == -1)
189 if (pcap_parsesrcstr(source, &type, NULL, NULL, name, errbuf) == -1)
210 /* Save the path for future reference */
211 snprintf(path, sizeof(path), "%s", name);
212 pathlen = strlen(path);
226 snprintf(errbuf, PCAP_ERRBUF_SIZE, "Error when listing files: does folder '%s' exist?", path);
232 unixdir= opendir(path);
236 "Error when listing files in '%s': %s", path, pcap_strerror(errno));
249 "Error when listing files in '%s': %s", path, pcap_strerror(errno));
263 snprintf(filename, sizeof(filename), "%s%s", path, filedata.cFileName);
268 snprintf(filename, sizeof(filename), "%s%s", path, filedata->d_name);
314 /* Create the new source identifier */
381 return pcap_findalldevs_ex_remote(source, auth, alldevs, errbuf);
389 pcap_t *pcap_open(const char *source, int snaplen, int flags, int read_timeout, struct pcap_rmtauth *auth, char *errbuf)
403 if (source == NULL)
404 source = "any";
406 if (strlen(source) > PCAP_BUF_SIZE)
408 snprintf(errbuf, PCAP_ERRBUF_SIZE, "The source string is too long. Cannot handle it correctly.");
413 * Determine the type of the source (file, local, remote) and,
416 if (pcap_parsesrcstr(source, &type, NULL, NULL, name, errbuf) == -1)
431 * to pass only 'source' to pcap_open_rpcap(), so that it
435 return pcap_open_rpcap(source, snaplen, flags, read_timeout, auth, errbuf);