diff options
| author | Niranjan Pendharkar <npendhar@codeaurora.org> | 2011-11-16 12:50:36 -0800 |
|---|---|---|
| committer | Giulio Cervera <giulio.cervera@gmail.com> | 2012-09-23 17:15:37 +0200 |
| commit | 7c9bc378e45b8dcac8bb3ba60748adbdbb4d15a9 (patch) | |
| tree | a7a358f5b98884ffec800d43e18185fb18977dd8 /include/netutils | |
| parent | d39f52491364217e40aca4fb06ed9f7903af60f0 (diff) | |
| download | system_core-7c9bc378e45b8dcac8bb3ba60748adbdbb4d15a9.tar.gz system_core-7c9bc378e45b8dcac8bb3ba60748adbdbb4d15a9.tar.bz2 system_core-7c9bc378e45b8dcac8bb3ba60748adbdbb4d15a9.zip | |
core: Add API to retrieve mtu size
Adding an API to libnetutils to retrieve mtu size of an interface
Made few utility functions from ifc_utils public
Change-Id: Iddec2dcd9f241b146d7f362e2df0724cf740d1f2
(cherry picked from commit 108cded7d96cc347f36b5b78c404c5ebccce13d7)
Diffstat (limited to 'include/netutils')
| -rw-r--r-- | include/netutils/ifc.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/include/netutils/ifc.h b/include/netutils/ifc.h index 67a4a456..834f73fa 100644 --- a/include/netutils/ifc.h +++ b/include/netutils/ifc.h @@ -1,5 +1,6 @@ /* * Copyright 2008, The Android Open Source Project + * Copyright (C) 2011, Code Aurora Forum. All rights reserved. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -61,10 +62,12 @@ extern int ifc_remove_route(const char *ifname, const char *dst, int prefix_length, const char *gw); extern int ifc_get_info(const char *name, in_addr_t *addr, int *prefixLength, unsigned *flags); - extern int ifc_configure(const char *ifname, in_addr_t address, uint32_t prefixLength, in_addr_t gateway, in_addr_t dns1, in_addr_t dns2); +extern int ifc_get_mtu(const char *name, int *mtuSz); +extern in_addr_t prefixLengthToIpv4Netmask(int prefix_length); +extern int ipv4NetmaskToPrefixLength(in_addr_t mask); __END_DECLS |
