diff options
author | Marcel Holtmann <marcel@holtmann.org> | 2011-05-27 10:06:10 -0700 |
---|---|---|
committer | Marcel Holtmann <marcel@holtmann.org> | 2011-05-27 10:06:10 -0700 |
commit | 4c114680943b657b10fe5c8313e826f697f8a1b9 (patch) | |
tree | 8fb831bc38b8188dab422594ed66b496b073955f /gisi | |
parent | ebb82bee811727823388ed7b1f429dbb19c42697 (diff) | |
download | ofono-4c114680943b657b10fe5c8313e826f697f8a1b9.tar.gz |
gisi: Remove unused code for PN netlink address handling
Diffstat (limited to 'gisi')
-rw-r--r-- | gisi/netlink.c | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/gisi/netlink.c b/gisi/netlink.c index b2180f74..5fb246bf 100644 --- a/gisi/netlink.c +++ b/gisi/netlink.c @@ -112,34 +112,6 @@ static int pn_netlink_socket(void) return fd; } -static void pn_netlink_addr(GIsiPhonetNetlink *self, struct nlmsghdr *nlh) -{ - int len; - uint8_t local = 0xff; - uint8_t remote = 0xff; - - const struct ifaddrmsg *ifa; - const struct rtattr *rta; - - ifa = NLMSG_DATA(nlh); - len = IFA_PAYLOAD(nlh); - - /* If Phonet is absent, kernel transmits other families... */ - if (ifa->ifa_family != AF_PHONET) - return; - - if (ifa->ifa_index != g_isi_modem_index(self->modem)) - return; - - for (rta = IFA_RTA(ifa); RTA_OK(rta, len); rta = RTA_NEXT(rta, len)) { - - if (rta->rta_type == IFA_LOCAL) - local = *(uint8_t *)RTA_DATA(rta); - else if (rta->rta_type == IFA_ADDRESS) - remote = *(uint8_t *)RTA_DATA(rta); - } -} - static void pn_netlink_link(GIsiPhonetNetlink *self, struct nlmsghdr *nlh) { const struct ifinfomsg *ifi; @@ -223,16 +195,10 @@ static gboolean pn_netlink_process(GIOChannel *channel, GIOCondition cond, strerror(-err->error)); return TRUE; } - case RTM_NEWADDR: - case RTM_DELADDR: - pn_netlink_addr(self, nlh); - break; case RTM_NEWLINK: case RTM_DELLINK: pn_netlink_link(self, nlh); break; - default: - continue; } } return TRUE; |