]> git.ipfire.org Git - thirdparty/squid.git/blobdiff - src/protos.h
SourceFormat Enforcement
[thirdparty/squid.git] / src / protos.h
index 520863954b50574dee9eef43d926041acd65c1f7..b49336a21d8398891bd5930a70bd3ba1818305dd 100644 (file)
 /* for parameters that still need these */
 #include "lookup_t.h"
 
-
 class HttpRequestMethod;
 #if USE_DELAY_POOLS
 class ClientInfo;
 #endif
 
-
 #if USE_FORW_VIA_DB
-SQUIDCEXTERN void fvdbCountVia(const char *key);
-SQUIDCEXTERN void fvdbCountForw(const char *key);
+extern void fvdbCountVia(const char *key);
+extern void fvdbCountForw(const char *key);
 #endif
 #if HEADERS_LOG
 SQUIDCEXTERN void headersLog(int cs, int pq, const HttpRequestMethod& m, void *data);
 #endif
-SQUIDCEXTERN int logTypeIsATcpHit(log_type);
+extern int logTypeIsATcpHit(log_type);
 
 /*
  * cache_cf.c
  */
 SQUIDCEXTERN void configFreeMemory(void);
 class MemBuf;
-SQUIDCEXTERN void wordlistCat(const wordlist *, MemBuf * mb);
-SQUIDCEXTERN void self_destruct(void);
+extern void wordlistCat(const wordlist *, MemBuf * mb);
+extern void self_destruct(void);
 SQUIDCEXTERN void add_http_port(char *portspec);
 extern int xatoi(const char *token);
 extern long xatol(const char *token);
 
-
 /* extra functions from cache_cf.c useful for lib modules */
 SQUIDCEXTERN void parse_int(int *var);
 SQUIDCEXTERN void parse_onoff(int *var);
@@ -79,7 +76,6 @@ SQUIDCEXTERN void parse_wordlist(wordlist ** list);
 SQUIDCEXTERN void requirePathnameExists(const char *name, const char *path);
 SQUIDCEXTERN void parse_time_t(time_t * var);
 
-
 /* client_side.c - FD related client side routines */
 
 SQUIDCEXTERN void clientdbInit(void);
@@ -125,13 +121,13 @@ SQUIDCEXTERN void file_write_mbuf(int fd, off_t, MemBuf mb, DWCB * handler, void
 SQUIDCEXTERN void file_read(int, char *, int, off_t, DRCB *, void *);
 SQUIDCEXTERN void disk_init(void);
 
-SQUIDCEXTERN void fd_close(int fd);
-SQUIDCEXTERN void fd_open(int fd, unsigned int type, const char *);
-SQUIDCEXTERN void fd_note(int fd, const char *);
-SQUIDCEXTERN void fd_bytes(int fd, int len, unsigned int type);
-SQUIDCEXTERN void fdDumpOpen(void);
-SQUIDCEXTERN int fdUsageHigh(void);
-SQUIDCEXTERN void fdAdjustReserved(void);
+extern void fd_close(int fd);
+extern void fd_open(int fd, unsigned int type, const char *);
+extern void fd_note(int fd, const char *);
+extern void fd_bytes(int fd, int len, unsigned int type);
+extern void fdDumpOpen(void);
+extern int fdUsageHigh(void);
+extern void fdAdjustReserved(void);
 
 SQUIDCEXTERN void fqdncache_nbgethostbyaddr(const Ip::Address &, FQDNH *, void *);
 
@@ -144,7 +140,7 @@ SQUIDCEXTERN const char *fqdnFromAddr(const Ip::Address &);
 SQUIDCEXTERN int fqdncacheQueueDrain(void);
 SQUIDCEXTERN void fqdncacheFreeMemory(void);
 SQUIDCEXTERN void fqdncache_restart(void);
-void fqdncache_purgelru(void *);
+extern void fqdncache_purgelru(void *);
 SQUIDCEXTERN void fqdncacheAddEntryFromHosts(char *addr, wordlist * hostnames);
 
 class FwdState;
@@ -163,7 +159,6 @@ class HttpReply;
 /// \ingroup ServerProtocolFTPAPI
 SQUIDCEXTERN const char *ftpUrlWith2f(HttpRequest *);
 
-
 /**
  \defgroup ServerProtocolGopherAPI Server-Side Gopher API
  \ingroup ServerProtocol
@@ -175,7 +170,6 @@ SQUIDCEXTERN void gopherStart(FwdState *);
 /// \ingroup ServerProtocolGopherAPI
 SQUIDCEXTERN int gopherCachable(const HttpRequest *);
 
-
 /**
  \defgroup ServerProtocolWhoisAPI Server-Side WHOIS API
  \ingroup ServerProtocol
@@ -184,7 +178,6 @@ SQUIDCEXTERN int gopherCachable(const HttpRequest *);
 /// \ingroup ServerProtocolWhoisAPI
 SQUIDCEXTERN void whoisStart(FwdState *);
 
-
 /* http.c */
 /* for http_hdr_type field */
 #include "HttpHeader.h"
@@ -195,10 +188,9 @@ SQUIDCEXTERN mb_size_t httpBuildRequestPrefix(HttpRequest * request,
         StoreEntry * entry,
         MemBuf * mb,
         http_state_flags);
-SQUIDCEXTERN const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
+extern const char *httpMakeVaryMark(HttpRequest * request, HttpReply const * reply);
 
 #include "HttpStatusCode.h"
-SQUIDCEXTERN const char *httpStatusString(http_status status);
 
 class StatHist;
 
@@ -206,7 +198,7 @@ class StatHist;
 SQUIDCEXTERN void httpHdrCcInitModule(void);
 SQUIDCEXTERN void httpHdrCcCleanModule(void);
 SQUIDCEXTERN void httpHdrCcUpdateStats(const HttpHdrCc * cc, StatHist * hist);
-void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
+extern void httpHdrCcStatDumper(StoreEntry * sentry, int idx, double val, double size, int count);
 
 /* Http Header Tools */
 class HttpHeaderFieldInfo;
@@ -222,10 +214,7 @@ SQUIDCEXTERN int strListIsSubstr(const String * list, const char *s, char del);
 SQUIDCEXTERN int strListGetItem(const String * str, char del, const char **item, int *ilen, const char **pos);
 SQUIDCEXTERN const char *getStringPrefix(const char *str, const char *end);
 SQUIDCEXTERN int httpHeaderParseInt(const char *start, int *val);
-SQUIDCEXTERN int httpHeaderParseOffset(const char *start, int64_t * off);
-SQUIDCEXTERN void
-httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3;
-
+SQUIDCEXTERN void httpHeaderPutStrf(HttpHeader * hdr, http_hdr_type id, const char *fmt,...) PRINTF_FORMAT_ARG3;
 
 /* Http Header */
 SQUIDCEXTERN void httpHeaderInitModule(void);
@@ -260,9 +249,9 @@ extern variable_list *snmp_meshCtblFn(variable_list *, snint *);
 #endif /* SQUID_SNMP */
 
 #if USE_WCCP
-SQUIDCEXTERN void wccpInit(void);
-SQUIDCEXTERN void wccpConnectionOpen(void);
-SQUIDCEXTERN void wccpConnectionClose(void);
+extern void wccpInit(void);
+extern void wccpConnectionOpen(void);
+extern void wccpConnectionClose(void);
 #endif /* USE_WCCP */
 
 #if USE_WCCPv2
@@ -271,23 +260,23 @@ extern void wccp2ConnectionOpen(void);
 extern void wccp2ConnectionClose(void);
 #endif /* USE_WCCPv2 */
 
-SQUIDCEXTERN char *mime_get_header(const char *mime, const char *header);
-SQUIDCEXTERN char *mime_get_header_field(const char *mime, const char *name, const char *prefix);
-SQUIDCEXTERN size_t headersEnd(const char *, size_t);
+extern char *mime_get_header(const char *mime, const char *header);
+extern char *mime_get_header_field(const char *mime, const char *name, const char *prefix);
+extern size_t headersEnd(const char *, size_t);
 
-SQUIDCEXTERN void mimeInit(char *filename);
-SQUIDCEXTERN void mimeFreeMemory(void);
-SQUIDCEXTERN char *mimeGetContentEncoding(const char *fn);
-SQUIDCEXTERN char *mimeGetContentType(const char *fn);
-SQUIDCEXTERN char const *mimeGetIcon(const char *fn);
-SQUIDCEXTERN const char *mimeGetIconURL(const char *fn);
-SQUIDCEXTERN char mimeGetTransferMode(const char *fn);
-SQUIDCEXTERN int mimeGetDownloadOption(const char *fn);
-SQUIDCEXTERN int mimeGetViewOption(const char *fn);
+extern void mimeInit(char *filename);
+extern void mimeFreeMemory(void);
+extern char *mimeGetContentEncoding(const char *fn);
+extern char *mimeGetContentType(const char *fn);
+extern char const *mimeGetIcon(const char *fn);
+extern const char *mimeGetIconURL(const char *fn);
+extern char mimeGetTransferMode(const char *fn);
+extern int mimeGetDownloadOption(const char *fn);
+extern int mimeGetViewOption(const char *fn);
 
 #include "ipcache.h"
-SQUIDCEXTERN int mcastSetTtl(int, int);
-SQUIDCEXTERN IPH mcastJoinGroups;
+extern int mcastSetTtl(int, int);
+extern IPH mcastJoinGroups;
 
 SQUIDCEXTERN peer *getFirstPeer(void);
 SQUIDCEXTERN peer *getFirstUpParent(HttpRequest *);
@@ -360,7 +349,6 @@ extern void shut_down(int);
 extern void rotate_logs(int);
 extern void reconfigure(int);
 
-
 extern void start_announce(void *unused);
 extern void waisStart(FwdState *);
 
@@ -398,23 +386,21 @@ SQUIDCEXTERN int memInUse(mem_type);
 SQUIDCEXTERN void memDataInit(mem_type, const char *, size_t, int, bool zeroOnPush = true);
 SQUIDCEXTERN void memCheckInit(void);
 
-
 /* Mem */
 SQUIDCEXTERN void memConfigure(void);
 
 /* ----------------------------------------------------------------- */
 
 /* repl_modules.c */
-SQUIDCEXTERN void storeReplSetup(void);
+extern void storeReplSetup(void);
 
 /*
  * store_log.c
  */
-SQUIDCEXTERN void storeLog(int tag, const StoreEntry * e);
-SQUIDCEXTERN void storeLogRotate(void);
-SQUIDCEXTERN void storeLogClose(void);
-SQUIDCEXTERN void storeLogOpen(void);
-
+extern void storeLog(int tag, const StoreEntry * e);
+extern void storeLogRotate(void);
+extern void storeLogClose(void);
+extern void storeLogOpen(void);
 
 /*
  * store_key_*.c
@@ -437,10 +423,10 @@ SQUIDCEXTERN HASHCMP storeKeyHashCmp;
 /*
  * store_digest.c
  */
-SQUIDCEXTERN void storeDigestInit(void);
-SQUIDCEXTERN void storeDigestNoteStoreReady(void);
-SQUIDCEXTERN void storeDigestScheduleRebuild(void);
-SQUIDCEXTERN void storeDigestDel(const StoreEntry * entry);
+extern void storeDigestInit(void);
+extern void storeDigestNoteStoreReady(void);
+extern void storeDigestScheduleRebuild(void);
+extern void storeDigestDel(const StoreEntry * entry);
 extern void storeDigestReport(StoreEntry *);
 
 /*
@@ -452,18 +438,17 @@ SQUIDCEXTERN void storeRebuildComplete(struct _store_rebuild_data *);
 SQUIDCEXTERN void storeRebuildProgress(int sd_index, int total, int sofar);
 
 /// loads entry from disk; fills supplied memory buffer on success
-bool storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, struct _store_rebuild_data &counts);
+extern bool storeRebuildLoadEntry(int fd, int diskIndex, MemBuf &buf, struct _store_rebuild_data &counts);
 /// parses entry buffer and validates entry metadata; fills e on success
-bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, struct _store_rebuild_data &counts, uint64_t expectedSize);
+extern bool storeRebuildParseEntry(MemBuf &buf, StoreEntry &e, cache_key *key, struct _store_rebuild_data &counts, uint64_t expectedSize);
 /// checks whether the loaded entry should be kept; updates counters
-bool storeRebuildKeepEntry(const StoreEntry &e, const cache_key *key, struct _store_rebuild_data &counts);
-
+extern bool storeRebuildKeepEntry(const StoreEntry &e, const cache_key *key, struct _store_rebuild_data &counts);
 
 /*
  * store_swapin.c
  */
 class store_client;
-SQUIDCEXTERN void storeSwapInStart(store_client *);
+extern void storeSwapInStart(store_client *);
 
 /*
  * store_client.c
@@ -475,16 +460,15 @@ SQUIDCEXTERN int storeUnregister(store_client * sc, StoreEntry * e, void *data)
 SQUIDCEXTERN int storePendingNClients(const StoreEntry * e);
 SQUIDCEXTERN int storeClientIsThisAClient(store_client * sc, void *someClient);
 
-
 SQUIDCEXTERN const char *getMyHostname(void);
 SQUIDCEXTERN const char *uniqueHostname(void);
 SQUIDCEXTERN void safeunlink(const char *path, int quiet);
 
 #include "fatal.h"
-void death(int sig);
-void sigusr2_handle(int sig);
-void sig_child(int sig);
-void sig_shutdown(int sig); ///< handles shutdown notifications from kids
+extern void death(int sig);
+extern void sigusr2_handle(int sig);
+extern void sig_child(int sig);
+extern void sig_shutdown(int sig); ///< handles shutdown notifications from kids
 SQUIDCEXTERN void leave_suid(void);
 SQUIDCEXTERN void enter_suid(void);
 SQUIDCEXTERN void no_suid(void);
@@ -508,7 +492,7 @@ SQUIDCEXTERN bool IamCoordinatorProcess();
 /// whether the current process handles HTTP transactions and such
 SQUIDCEXTERN bool IamWorkerProcess();
 /// whether the current process is dedicated to managing a cache_dir
-bool IamDiskProcess();
+extern bool IamDiskProcess();
 /// Whether we are running in daemon mode
 SQUIDCEXTERN bool InDaemonMode(); // try using specific Iam*() checks above first
 /// Whether there should be more than one worker process running
@@ -516,7 +500,7 @@ SQUIDCEXTERN bool UsingSmp(); // try using specific Iam*() checks above first
 /// number of Kid processes as defined in src/ipc/Kid.h
 SQUIDCEXTERN int NumberOfKids();
 /// a string describing this process roles such as worker or coordinator
-String ProcessRoles();
+extern String ProcessRoles();
 SQUIDCEXTERN int DebugSignal;
 
 /* AYJ debugs function to show locations being reset with memset() */
@@ -577,7 +561,7 @@ SQUIDCEXTERN int stringHasCntl(const char *);
 SQUIDCEXTERN void linklistPush(link_list **, void *);
 SQUIDCEXTERN void *linklistShift(link_list **);
 SQUIDCEXTERN int xrename(const char *from, const char *to);
-SQUIDCEXTERN int isPowTen(int);
+extern int isPowTen(int);
 SQUIDCEXTERN void parseEtcHosts(void);
 SQUIDCEXTERN int getMyPort(void);
 SQUIDCEXTERN void setUmask(mode_t mask);
@@ -585,7 +569,6 @@ SQUIDCEXTERN void setUmask(mode_t mask);
 SQUIDCEXTERN char *strwordtok(char *buf, char **t);
 SQUIDCEXTERN void strwordquote(MemBuf * mb, const char *str);
 
-
 /*
  * ipc.c
  */