• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 // This file is to hide the netlink implementation details since the netlink.h
6 // header contains a struct net; which conflicts with the net namespace.  So we
7 // separate out all the netlink stuff into these files.
8 
9 #ifndef NET_BASE_NETWORK_CHANGE_NOTIFIER_NETLINK_LINUX_H_
10 #define NET_BASE_NETWORK_CHANGE_NOTIFIER_NETLINK_LINUX_H_
11 #pragma once
12 
13 #include <cstddef>
14 
15 // Returns the file descriptor if successful.  Otherwise, returns -1.
16 int InitializeNetlinkSocket();
17 
18 // Returns true if a network change has been detected, otherwise returns false.
19 bool HandleNetlinkMessage(char* buf, size_t len);
20 
21 #endif  // NET_BASE_NETWORK_CHANGE_NOTIFIER_NETLINK_LINUX_H_
22