Check ip before ping

This commit is contained in:
Nick Peng
2018-06-04 23:20:10 +08:00
parent e3d341843d
commit 63dadb4cac
10 changed files with 111 additions and 21 deletions

View File

@@ -1,4 +1,3 @@
//Source: http://golubenco.org/atomic-operations.html
#ifndef _GENERIC_ATOMIC_H
#define _GENERIC_ATOMIC_H

22
include/cache.h Normal file
View File

@@ -0,0 +1,22 @@
#ifndef _GENERIC_CACHE_H
#include "list.h"
#include "hashtable.h"
struct cache_node {
struct hlist_node list;
};
struct cache_head;
struct cache_head *cache_new(int hashsize, void (*item_free)(struct cache_head *head, struct cache_node *node));
int cache_add(struct cache_head *head, struct cache_node *node, void *key, int key_len);
struct cache_node *cache_lookup(struct cache_head *head, void *key, int key_len);
int cache_update(struct cache_head *head, void *key, int key_len);
void cache_free(struct cache_head *head);
#endif // !_GENERIC_CACHE_H

View File

@@ -1,4 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_
#define _TOOLS_LINUX_ASM_GENERIC_BITOPS_FIND_H_

View File

@@ -1,4 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0 */
#ifndef _TOOLS_LINUX_COMPILER_H_
#define _TOOLS_LINUX_COMPILER_H_

View File

@@ -1,4 +1,3 @@
/* SPDX-License-Identifier: GPL-2.0 */
/*
* Statically sized hash table implementation
* (C) 2012 Sasha Levin <levinsasha928@gmail.com>