blob: 1fcda245f507eaee2959aa71522cd0668f59815c [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
2 * Copyright 2014 Open Networking Laboratory
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 */
Brian O'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.net.proxyarp.impl;
alshabibb5522ff2014-09-29 19:20:00 -070017
Jonathan Hart6cd2f352015-01-13 17:44:45 -080018import com.google.common.collect.HashMultimap;
19import com.google.common.collect.Lists;
20import com.google.common.collect.Multimap;
alshabibb5522ff2014-09-29 19:20:00 -070021import org.apache.felix.scr.annotations.Activate;
22import org.apache.felix.scr.annotations.Component;
23import org.apache.felix.scr.annotations.Deactivate;
24import org.apache.felix.scr.annotations.Reference;
25import org.apache.felix.scr.annotations.ReferenceCardinality;
26import org.apache.felix.scr.annotations.Service;
Jonathan Harte8600eb2015-01-12 10:30:45 -080027import org.onlab.packet.ARP;
28import org.onlab.packet.Ethernet;
29import org.onlab.packet.Ip4Address;
30import org.onlab.packet.IpAddress;
31import org.onlab.packet.MacAddress;
32import org.onlab.packet.VlanId;
Brian O'Connorabafb502014-12-02 22:26:20 -080033import org.onosproject.net.ConnectPoint;
34import org.onosproject.net.Device;
35import org.onosproject.net.Host;
36import org.onosproject.net.HostId;
37import org.onosproject.net.Link;
38import org.onosproject.net.Port;
39import org.onosproject.net.PortNumber;
40import org.onosproject.net.device.DeviceEvent;
41import org.onosproject.net.device.DeviceListener;
42import org.onosproject.net.device.DeviceService;
43import org.onosproject.net.flow.DefaultTrafficTreatment;
44import org.onosproject.net.flow.TrafficTreatment;
45import org.onosproject.net.host.HostService;
46import org.onosproject.net.host.InterfaceIpAddress;
47import org.onosproject.net.host.PortAddresses;
48import org.onosproject.net.link.LinkEvent;
49import org.onosproject.net.link.LinkListener;
50import org.onosproject.net.link.LinkService;
51import org.onosproject.net.packet.DefaultOutboundPacket;
52import org.onosproject.net.packet.InboundPacket;
53import org.onosproject.net.packet.PacketContext;
54import org.onosproject.net.packet.PacketService;
55import org.onosproject.net.proxyarp.ProxyArpService;
alshabibb5522ff2014-09-29 19:20:00 -070056import org.slf4j.Logger;
57
Jonathan Hart6cd2f352015-01-13 17:44:45 -080058import java.nio.ByteBuffer;
59import java.util.HashSet;
60import java.util.List;
61import java.util.Map.Entry;
62import java.util.Set;
63
64import static com.google.common.base.Preconditions.checkArgument;
65import static com.google.common.base.Preconditions.checkNotNull;
66import static org.slf4j.LoggerFactory.getLogger;
alshabibb5522ff2014-09-29 19:20:00 -070067
alshabibb5522ff2014-09-29 19:20:00 -070068@Component(immediate = true)
69@Service
70public class ProxyArpManager implements ProxyArpService {
71
72 private final Logger log = getLogger(getClass());
73
74 private static final String MAC_ADDR_NULL = "Mac address cannot be null.";
75 private static final String REQUEST_NULL = "Arp request cannot be null.";
76 private static final String REQUEST_NOT_ARP = "Ethernet frame does not contain ARP request.";
77 private static final String NOT_ARP_REQUEST = "ARP is not a request.";
Jonathan Hart704ca142014-10-09 09:34:39 -070078 private static final String NOT_ARP_REPLY = "ARP is not a reply.";
alshabibb5522ff2014-09-29 19:20:00 -070079
80 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
81 protected HostService hostService;
82
83 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
84 protected PacketService packetService;
85
86 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
87 protected LinkService linkService;
88
89 @Reference(cardinality = ReferenceCardinality.MANDATORY_UNARY)
90 protected DeviceService deviceService;
91
92 private final Multimap<Device, PortNumber> internalPorts =
93 HashMultimap.<Device, PortNumber>create();
94
95 private final Multimap<Device, PortNumber> externalPorts =
96 HashMultimap.<Device, PortNumber>create();
97
98 /**
99 * Listens to both device service and link service to determine
100 * whether a port is internal or external.
101 */
102 @Activate
103 public void activate() {
104 deviceService.addListener(new InternalDeviceListener());
105 linkService.addListener(new InternalLinkListener());
106 determinePortLocations();
Pavlin Radoslavovd36a74b2015-01-09 11:59:07 -0800107
alshabibb5522ff2014-09-29 19:20:00 -0700108 log.info("Started");
109 }
110
111
112 @Deactivate
113 public void deactivate() {
114 log.info("Stopped");
115 }
116
117 @Override
Jonathan Hartf84591d2015-01-16 14:33:43 -0800118 public boolean isKnown(Ip4Address addr) {
Yuta HIGUCHI59718042014-10-04 22:04:56 -0700119 checkNotNull(addr, MAC_ADDR_NULL);
alshabibb5522ff2014-09-29 19:20:00 -0700120 Set<Host> hosts = hostService.getHostsByIp(addr);
121 return !hosts.isEmpty();
122 }
123
124 @Override
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700125 public void reply(Ethernet eth, ConnectPoint inPort) {
Yuta HIGUCHI59718042014-10-04 22:04:56 -0700126 checkNotNull(eth, REQUEST_NULL);
alshabibb5522ff2014-09-29 19:20:00 -0700127 checkArgument(eth.getEtherType() == Ethernet.TYPE_ARP,
128 REQUEST_NOT_ARP);
129 ARP arp = (ARP) eth.getPayload();
130 checkArgument(arp.getOpCode() == ARP.OP_REQUEST, NOT_ARP_REQUEST);
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700131 checkNotNull(inPort);
132
Jonathan Hart6cd2f352015-01-13 17:44:45 -0800133 VlanId vlan = VlanId.vlanId(eth.getVlanID());
134
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700135 // If the request came from outside the network, only reply if it was
136 // for one of our external addresses.
137 if (isOutsidePort(inPort)) {
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800138 Ip4Address target =
139 Ip4Address.valueOf(arp.getTargetProtocolAddress());
Jonathan Harta887ba82014-11-03 15:20:52 -0800140 Set<PortAddresses> addressSet =
Pavlin Radoslavov76b0ae22014-10-27 15:33:19 -0700141 hostService.getAddressBindingsForPort(inPort);
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700142
Jonathan Harta887ba82014-11-03 15:20:52 -0800143 for (PortAddresses addresses : addressSet) {
144 for (InterfaceIpAddress ia : addresses.ipAddresses()) {
145 if (ia.ipAddress().equals(target)) {
146 Ethernet arpReply =
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800147 buildArpReply(target, addresses.mac(), eth);
Jonathan Harta887ba82014-11-03 15:20:52 -0800148 sendTo(arpReply, inPort);
149 }
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700150 }
151 }
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700152 return;
Pavlin Radoslavov76b0ae22014-10-27 15:33:19 -0700153 } else {
154 // If the source address matches one of our external addresses
155 // it could be a request from an internal host to an external
Jonathan Hart1f793a72014-11-12 23:22:02 -0800156 // address. Forward it over to the correct ports.
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800157 Ip4Address source =
158 Ip4Address.valueOf(arp.getSenderProtocolAddress());
Jonathan Hart1f793a72014-11-12 23:22:02 -0800159 Set<PortAddresses> sourceAddresses = findPortsInSubnet(source);
160 boolean matched = false;
161 for (PortAddresses pa : sourceAddresses) {
162 for (InterfaceIpAddress ia : pa.ipAddresses()) {
Jonathan Hart6cd2f352015-01-13 17:44:45 -0800163 if (ia.ipAddress().equals(source) &&
164 pa.vlan().equals(vlan)) {
Jonathan Hart1f793a72014-11-12 23:22:02 -0800165 matched = true;
166 sendTo(eth, pa.connectPoint());
Pavlin Radoslavov76b0ae22014-10-27 15:33:19 -0700167 }
168 }
169 }
Jonathan Hart1f793a72014-11-12 23:22:02 -0800170
171 if (matched) {
172 return;
173 }
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700174 }
175
176 // Continue with normal proxy ARP case
alshabibb5522ff2014-09-29 19:20:00 -0700177
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800178 Set<Host> hosts = hostService.getHostsByIp(
179 Ip4Address.valueOf(arp.getTargetProtocolAddress()));
alshabibb5522ff2014-09-29 19:20:00 -0700180
181 Host dst = null;
182 Host src = hostService.getHost(HostId.hostId(eth.getSourceMAC(),
183 VlanId.vlanId(eth.getVlanID())));
184
185 for (Host host : hosts) {
186 if (host.vlan().equals(vlan)) {
187 dst = host;
188 break;
189 }
190 }
191
192 if (src == null || dst == null) {
Jonathan Hartf84591d2015-01-16 14:33:43 -0800193 flood(eth, inPort);
alshabibb5522ff2014-09-29 19:20:00 -0700194 return;
195 }
196
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800197 //
198 // TODO find the correct IP address.
199 // Right now we use the first IPv4 address that is found.
200 //
201 for (IpAddress ipAddress : dst.ipAddresses()) {
202 Ip4Address ip4Address = ipAddress.getIp4Address();
203 if (ip4Address != null) {
204 Ethernet arpReply = buildArpReply(ip4Address, dst.mac(), eth);
205 // TODO: check send status with host service.
206 sendTo(arpReply, src.location());
207 break;
208 }
209 }
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700210 }
211
212 /**
213 * Outputs the given packet out the given port.
214 *
215 * @param packet the packet to send
216 * @param outPort the port to send it out
217 */
218 private void sendTo(Ethernet packet, ConnectPoint outPort) {
219 if (internalPorts.containsEntry(
220 deviceService.getDevice(outPort.deviceId()), outPort.port())) {
221 // Sanity check to make sure we don't send the packet out an
222 // internal port and create a loop (could happen due to
223 // misconfiguration).
224 return;
225 }
226
tom9a693fd2014-10-03 11:32:19 -0700227 TrafficTreatment.Builder builder = DefaultTrafficTreatment.builder();
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700228 builder.setOutput(outPort.port());
229 packetService.emit(new DefaultOutboundPacket(outPort.deviceId(),
230 builder.build(), ByteBuffer.wrap(packet.serialize())));
231 }
232
233 /**
Jonathan Hart1f793a72014-11-12 23:22:02 -0800234 * Finds ports with an address in the subnet of the target address.
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700235 *
Pavlin Radoslavov76b0ae22014-10-27 15:33:19 -0700236 * @param target the target address to find a matching port for
Jonathan Hart1f793a72014-11-12 23:22:02 -0800237 * @return a set of PortAddresses describing ports in the subnet
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700238 */
Jonathan Hart1f793a72014-11-12 23:22:02 -0800239 private Set<PortAddresses> findPortsInSubnet(Ip4Address target) {
240 Set<PortAddresses> result = new HashSet<PortAddresses>();
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700241 for (PortAddresses addresses : hostService.getAddressBindings()) {
Pavlin Radoslavov76b0ae22014-10-27 15:33:19 -0700242 for (InterfaceIpAddress ia : addresses.ipAddresses()) {
243 if (ia.subnetAddress().contains(target)) {
Jonathan Hart1f793a72014-11-12 23:22:02 -0800244 result.add(addresses);
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700245 }
246 }
247 }
Jonathan Hart1f793a72014-11-12 23:22:02 -0800248 return result;
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700249 }
250
251 /**
252 * Returns whether the given port is an outside-facing port with an IP
253 * address configured.
254 *
255 * @param port the port to check
256 * @return true if the port is an outside-facing port, otherwise false
257 */
258 private boolean isOutsidePort(ConnectPoint port) {
Pavlin Radoslavov76b0ae22014-10-27 15:33:19 -0700259 //
260 // TODO: Is this sufficient to identify outside-facing ports: just
261 // having IP addresses on a port?
262 //
Jonathan Harta887ba82014-11-03 15:20:52 -0800263 return !hostService.getAddressBindingsForPort(port).isEmpty();
alshabibb5522ff2014-09-29 19:20:00 -0700264 }
265
266 @Override
Jonathan Hartf84591d2015-01-16 14:33:43 -0800267 public void forward(Ethernet eth, ConnectPoint inPort) {
Yuta HIGUCHI59718042014-10-04 22:04:56 -0700268 checkNotNull(eth, REQUEST_NULL);
alshabibb5522ff2014-09-29 19:20:00 -0700269 checkArgument(eth.getEtherType() == Ethernet.TYPE_ARP,
270 REQUEST_NOT_ARP);
271 ARP arp = (ARP) eth.getPayload();
Jonathan Hart704ca142014-10-09 09:34:39 -0700272 checkArgument(arp.getOpCode() == ARP.OP_REPLY, NOT_ARP_REPLY);
alshabibb5522ff2014-09-29 19:20:00 -0700273
274 Host h = hostService.getHost(HostId.hostId(eth.getDestinationMAC(),
275 VlanId.vlanId(eth.getVlanID())));
276
277 if (h == null) {
Jonathan Hartf84591d2015-01-16 14:33:43 -0800278 flood(eth, inPort);
alshabibb5522ff2014-09-29 19:20:00 -0700279 } else {
tom9a693fd2014-10-03 11:32:19 -0700280 TrafficTreatment.Builder builder = DefaultTrafficTreatment.builder();
alshabibb5522ff2014-09-29 19:20:00 -0700281 builder.setOutput(h.location().port());
282 packetService.emit(new DefaultOutboundPacket(h.location().deviceId(),
283 builder.build(), ByteBuffer.wrap(eth.serialize())));
284 }
285
286 }
287
alshabibc274c902014-10-03 14:58:27 -0700288 @Override
289 public boolean handleArp(PacketContext context) {
290 InboundPacket pkt = context.inPacket();
291 Ethernet ethPkt = pkt.parsed();
Jonathan Harte8600eb2015-01-12 10:30:45 -0800292 if (ethPkt != null && ethPkt.getEtherType() == Ethernet.TYPE_ARP) {
alshabibc274c902014-10-03 14:58:27 -0700293 ARP arp = (ARP) ethPkt.getPayload();
294 if (arp.getOpCode() == ARP.OP_REPLY) {
Jonathan Hartf84591d2015-01-16 14:33:43 -0800295 forward(ethPkt, context.inPacket().receivedFrom());
alshabibc274c902014-10-03 14:58:27 -0700296 } else if (arp.getOpCode() == ARP.OP_REQUEST) {
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700297 reply(ethPkt, context.inPacket().receivedFrom());
alshabibc274c902014-10-03 14:58:27 -0700298 }
299 context.block();
300 return true;
301 }
302 return false;
303 }
304
alshabibb5522ff2014-09-29 19:20:00 -0700305 /**
306 * Flood the arp request at all edges in the network.
307 * @param request the arp request.
308 */
Jonathan Hartf84591d2015-01-16 14:33:43 -0800309 private void flood(Ethernet request, ConnectPoint inPort) {
alshabibb5522ff2014-09-29 19:20:00 -0700310 TrafficTreatment.Builder builder = null;
311 ByteBuffer buf = ByteBuffer.wrap(request.serialize());
312
313 synchronized (externalPorts) {
314 for (Entry<Device, PortNumber> entry : externalPorts.entries()) {
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700315 ConnectPoint cp = new ConnectPoint(entry.getKey().id(), entry.getValue());
Jonathan Hartf84591d2015-01-16 14:33:43 -0800316 if (isOutsidePort(cp) || cp.equals(inPort)) {
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700317 continue;
318 }
319
tom9a693fd2014-10-03 11:32:19 -0700320 builder = DefaultTrafficTreatment.builder();
alshabibb5522ff2014-09-29 19:20:00 -0700321 builder.setOutput(entry.getValue());
322 packetService.emit(new DefaultOutboundPacket(entry.getKey().id(),
323 builder.build(), buf));
324 }
alshabibb5522ff2014-09-29 19:20:00 -0700325 }
326 }
327
328 /**
329 * Determines the location of all known ports in the system.
330 */
331 private void determinePortLocations() {
332 Iterable<Device> devices = deviceService.getDevices();
333 Iterable<Link> links = null;
334 List<PortNumber> ports = null;
335 for (Device d : devices) {
336 ports = buildPortNumberList(deviceService.getPorts(d.id()));
337 links = linkService.getLinks();
338 for (Link l : links) {
339 // for each link, mark the concerned ports as internal
340 // and the remaining ports are therefore external.
Yuta HIGUCHI3541bf22014-10-04 22:06:19 -0700341 if (l.src().deviceId().equals(d.id())
alshabibb5522ff2014-09-29 19:20:00 -0700342 && ports.contains(l.src().port())) {
343 ports.remove(l.src().port());
344 internalPorts.put(d, l.src().port());
345 }
Yuta HIGUCHI3541bf22014-10-04 22:06:19 -0700346 if (l.dst().deviceId().equals(d.id())
alshabibb5522ff2014-09-29 19:20:00 -0700347 && ports.contains(l.dst().port())) {
348 ports.remove(l.dst().port());
349 internalPorts.put(d, l.dst().port());
350 }
351 }
352 synchronized (externalPorts) {
353 externalPorts.putAll(d, ports);
354 }
355 }
356
357 }
358
359 private List<PortNumber> buildPortNumberList(List<Port> ports) {
360 List<PortNumber> portNumbers = Lists.newLinkedList();
361 for (Port p : ports) {
362 portNumbers.add(p.number());
363 }
364 return portNumbers;
365 }
366
367 /**
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700368 * Builds an ARP reply based on a request.
369 *
370 * @param srcIp the IP address to use as the reply source
371 * @param srcMac the MAC address to use as the reply source
372 * @param request the ARP request we got
373 * @return an Ethernet frame containing the ARP reply
alshabibb5522ff2014-09-29 19:20:00 -0700374 */
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800375 private Ethernet buildArpReply(Ip4Address srcIp, MacAddress srcMac,
Jonathan Hartdbdbdbb2014-10-06 18:35:30 -0700376 Ethernet request) {
377
alshabibb5522ff2014-09-29 19:20:00 -0700378 Ethernet eth = new Ethernet();
Yuta HIGUCHI3e848a82014-11-02 20:19:42 -0800379 eth.setDestinationMACAddress(request.getSourceMAC());
380 eth.setSourceMACAddress(srcMac);
alshabibb5522ff2014-09-29 19:20:00 -0700381 eth.setEtherType(Ethernet.TYPE_ARP);
382 eth.setVlanID(request.getVlanID());
383
384 ARP arp = new ARP();
385 arp.setOpCode(ARP.OP_REPLY);
386 arp.setProtocolType(ARP.PROTO_TYPE_IP);
387 arp.setHardwareType(ARP.HW_TYPE_ETHERNET);
alshabib6eb438a2014-10-01 16:39:37 -0700388
Pavlin Radoslavov5b5dc482014-11-05 14:48:08 -0800389 arp.setProtocolAddressLength((byte) Ip4Address.BYTE_LENGTH);
alshabibb5522ff2014-09-29 19:20:00 -0700390 arp.setHardwareAddressLength((byte) Ethernet.DATALAYER_ADDRESS_LENGTH);
Yuta HIGUCHI3e848a82014-11-02 20:19:42 -0800391 arp.setSenderHardwareAddress(srcMac.toBytes());
alshabibb5522ff2014-09-29 19:20:00 -0700392 arp.setTargetHardwareAddress(request.getSourceMACAddress());
393
394 arp.setTargetProtocolAddress(((ARP) request.getPayload())
395 .getSenderProtocolAddress());
Jonathan Hartbcae7bd2014-10-16 10:24:41 -0700396 arp.setSenderProtocolAddress(srcIp.toInt());
alshabibb5522ff2014-09-29 19:20:00 -0700397 eth.setPayload(arp);
398 return eth;
399 }
400
401 public class InternalLinkListener implements LinkListener {
402
403 @Override
404 public void event(LinkEvent event) {
405 Link link = event.subject();
406 Device src = deviceService.getDevice(link.src().deviceId());
407 Device dst = deviceService.getDevice(link.dst().deviceId());
408 switch (event.type()) {
409 case LINK_ADDED:
410 synchronized (externalPorts) {
411 externalPorts.remove(src, link.src().port());
412 externalPorts.remove(dst, link.dst().port());
413 internalPorts.put(src, link.src().port());
414 internalPorts.put(dst, link.dst().port());
415 }
416
417 break;
418 case LINK_REMOVED:
419 synchronized (externalPorts) {
420 externalPorts.put(src, link.src().port());
421 externalPorts.put(dst, link.dst().port());
422 internalPorts.remove(src, link.src().port());
423 internalPorts.remove(dst, link.dst().port());
424 }
425
426 break;
427 case LINK_UPDATED:
428 // don't care about links being updated.
429 break;
430 default:
431 break;
432 }
433
434 }
435
436 }
437
438 public class InternalDeviceListener implements DeviceListener {
439
440 @Override
441 public void event(DeviceEvent event) {
442 Device device = event.subject();
443 switch (event.type()) {
444 case DEVICE_ADDED:
445 case DEVICE_AVAILABILITY_CHANGED:
alshabibb5522ff2014-09-29 19:20:00 -0700446 case DEVICE_SUSPENDED:
447 case DEVICE_UPDATED:
alshabibb5522ff2014-09-29 19:20:00 -0700448 // nothing to do in these cases; handled when links get reported
449 break;
450 case DEVICE_REMOVED:
451 synchronized (externalPorts) {
452 externalPorts.removeAll(device);
453 internalPorts.removeAll(device);
454 }
455 break;
456 case PORT_ADDED:
alshabib6eb438a2014-10-01 16:39:37 -0700457 case PORT_UPDATED:
alshabibb5522ff2014-09-29 19:20:00 -0700458 synchronized (externalPorts) {
alshabib6eb438a2014-10-01 16:39:37 -0700459 if (event.port().isEnabled()) {
460 externalPorts.put(device, event.port().number());
461 internalPorts.remove(device, event.port().number());
462 }
alshabibb5522ff2014-09-29 19:20:00 -0700463 }
464 break;
465 case PORT_REMOVED:
466 synchronized (externalPorts) {
467 externalPorts.remove(device, event.port().number());
468 internalPorts.remove(device, event.port().number());
469 }
470 break;
471 default:
472 break;
473
474 }
475
476 }
477
alshabibc274c902014-10-03 14:58:27 -0700478 }
alshabibb5522ff2014-09-29 19:20:00 -0700479
480}