blob: 3fe531fd79600e0d125a2e96a82842d9232d5792 [file] [log] [blame]
Nathan Harold1afbef42017-03-01 18:55:06 -08001/*
2** Copyright 2017, 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
17package android.net;
18
Nathan Harold93962f32017-03-07 13:23:36 -080019import android.net.Network;
20import android.net.IpSecConfig;
Nathan Harold8dc1fd02017-04-04 19:37:48 -070021import android.net.IpSecUdpEncapResponse;
22import android.net.IpSecSpiResponse;
23import android.net.IpSecTransformResponse;
Nathan Harold93962f32017-03-07 13:23:36 -080024import android.os.Bundle;
25import android.os.IBinder;
26import android.os.ParcelFileDescriptor;
27
Nathan Harold1afbef42017-03-01 18:55:06 -080028/**
29 * @hide
30 */
31interface IIpSecService
32{
Jonathan Basseri5fb92902017-11-16 10:58:01 -080033 IpSecSpiResponse allocateSecurityParameterIndex(
Nathan Harolda2523312018-01-05 19:25:13 -080034 in String destinationAddress, int requestedSpi, in IBinder binder);
Nathan Harold93962f32017-03-07 13:23:36 -080035
36 void releaseSecurityParameterIndex(int resourceId);
37
Nathan Harold8dc1fd02017-04-04 19:37:48 -070038 IpSecUdpEncapResponse openUdpEncapsulationSocket(int port, in IBinder binder);
Nathan Harold93962f32017-03-07 13:23:36 -080039
Nathan Harold8dc1fd02017-04-04 19:37:48 -070040 void closeUdpEncapsulationSocket(int resourceId);
Nathan Harold93962f32017-03-07 13:23:36 -080041
Nathan Harold8dc1fd02017-04-04 19:37:48 -070042 IpSecTransformResponse createTransportModeTransform(in IpSecConfig c, in IBinder binder);
Nathan Harold93962f32017-03-07 13:23:36 -080043
44 void deleteTransportModeTransform(int transformId);
45
Nathan Harolda2523312018-01-05 19:25:13 -080046 void applyTransportModeTransform(in ParcelFileDescriptor socket, int direction, int transformId);
Nathan Harold93962f32017-03-07 13:23:36 -080047
Nathan Harolda2523312018-01-05 19:25:13 -080048 void removeTransportModeTransforms(in ParcelFileDescriptor socket, int transformId);
Nathan Harold1afbef42017-03-01 18:55:06 -080049}