| OLD | NEW |
| (Empty) |
| 1 /* | |
| 2 * Licensed to the Apache Software Foundation (ASF) under one or more | |
| 3 * contributor license agreements. See the NOTICE file distributed with | |
| 4 * this work for additional information regarding copyright ownership. | |
| 5 * The ASF licenses this file to You under the Apache License, Version 2.0 | |
| 6 * (the "License"); you may not use this file except in compliance with | |
| 7 * the License. You may obtain a copy of the License at | |
| 8 * | |
| 9 * http://www.apache.org/licenses/LICENSE-2.0 | |
| 10 * | |
| 11 * Unless required by applicable law or agreed to in writing, software | |
| 12 * distributed under the License is distributed on an "AS IS" BASIS, | |
| 13 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |
| 14 * See the License for the specific language governing permissions and | |
| 15 * limitations under the License. | |
| 16 */ | |
| 17 | |
| 18 package org.apache.tomcat.jni; | |
| 19 | |
| 20 /** Multicast | |
| 21 * | |
| 22 * @author Mladen Turk | |
| 23 */ | |
| 24 public class Multicast { | |
| 25 | |
| 26 /** | |
| 27 * Join a Multicast Group | |
| 28 * @param sock The socket to join a multicast group | |
| 29 * @param join The address of the multicast group to join | |
| 30 * @param iface Address of the interface to use. If NULL is passed, the | |
| 31 * default multicast interface will be used. (OS Dependent) | |
| 32 * @param source Source Address to accept transmissions from (non-NULL | |
| 33 * implies Source-Specific Multicast) | |
| 34 */ | |
| 35 public static native int join(long sock, long join, | |
| 36 long iface, long source); | |
| 37 | |
| 38 /** | |
| 39 * Leave a Multicast Group. All arguments must be the same as | |
| 40 * apr_mcast_join. | |
| 41 * @param sock The socket to leave a multicast group | |
| 42 * @param addr The address of the multicast group to leave | |
| 43 * @param iface Address of the interface to use. If NULL is passed, the | |
| 44 * default multicast interface will be used. (OS Dependent) | |
| 45 * @param source Source Address to accept transmissions from (non-NULL | |
| 46 * implies Source-Specific Multicast) | |
| 47 */ | |
| 48 public static native int leave(long sock, long addr, | |
| 49 long iface, long source); | |
| 50 | |
| 51 /** | |
| 52 * Set the Multicast Time to Live (ttl) for a multicast transmission. | |
| 53 * @param sock The socket to set the multicast ttl | |
| 54 * @param ttl Time to live to Assign. 0-255, default=1 | |
| 55 * <br><b>Remark :</b> If the TTL is 0, packets will only be seen | |
| 56 * by sockets on the local machine, | |
| 57 * and only when multicast loopback is enabled. | |
| 58 */ | |
| 59 public static native int hops(long sock, int ttl); | |
| 60 | |
| 61 /** | |
| 62 * Toggle IP Multicast Loopback | |
| 63 * @param sock The socket to set multicast loopback | |
| 64 * @param opt false=disable, true=enable | |
| 65 */ | |
| 66 public static native int loopback(long sock, boolean opt); | |
| 67 | |
| 68 | |
| 69 /** | |
| 70 * Set the Interface to be used for outgoing Multicast Transmissions. | |
| 71 * @param sock The socket to set the multicast interface on | |
| 72 * @param iface Address of the interface to use for Multicast | |
| 73 */ | |
| 74 public static native int ointerface(long sock, long iface); | |
| 75 | |
| 76 } | |
| OLD | NEW |