Home | History | Annotate | Download | only in net
      1 /*
      2  * Copyright (C) 2016 The Android Open Source Project
      3  *
      4  * Licensed under the Apache License, Version 2.0 (the "License");
      5  * you may not use this file except in compliance with the License.
      6  * You may obtain a copy of the License at
      7  *
      8  *      http://www.apache.org/licenses/LICENSE-2.0
      9  *
     10  * Unless required by applicable law or agreed to in writing, software
     11  * distributed under the License is distributed on an "AS IS" BASIS,
     12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13  * See the License for the specific language governing permissions and
     14  * limitations under the License.
     15  */
     16 
     17 package android.net;
     18 
     19 /** {@hide} */
     20 oneway interface INetdEventCallback {
     21 
     22     /**
     23      * Reports a single DNS lookup function call.
     24      * This method must not block or perform long-running operations.
     25      *
     26      * @param hostname the name that was looked up.
     27      * @param ipAddresses (possibly a subset of) the IP addresses returned.
     28      *        At most {@link #DNS_REPORTED_IP_ADDRESSES_LIMIT} addresses are logged.
     29      * @param ipAddressesCount the number of IP addresses returned. May be different from the length
     30      *        of ipAddresses if there were too many addresses to log.
     31      * @param timestamp the timestamp at which the query was reported by netd.
     32      * @param uid the UID of the application that performed the query.
     33      */
     34     void onDnsEvent(String hostname, in String[] ipAddresses, int ipAddressesCount, long timestamp,
     35             int uid);
     36 
     37     /**
     38      * Reports a single connect library call.
     39      * This method must not block or perform long-running operations.
     40      *
     41      * @param ipAddr destination IP address.
     42      * @param port destination port number.
     43      * @param timestamp the timestamp at which the call was reported by netd.
     44      * @param uid the UID of the application that performed the connection.
     45      */
     46     void onConnectEvent(String ipAddr, int port, long timestamp, int uid);
     47 }
     48