mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 18:52:45 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			10 lines
		
	
	
	
		
			357 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			10 lines
		
	
	
	
		
			357 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #include <Kernel/Net/LoopbackAdapter.h>
 | |
| #include <Kernel/Net/Routing.h>
 | |
| 
 | |
| NetworkAdapter* adapter_for_route_to(const IPv4Address& ipv4_address)
 | |
| {
 | |
|     // FIXME: Have an actual routing table.
 | |
|     if (ipv4_address == IPv4Address(127, 0, 0, 1))
 | |
|         return &LoopbackAdapter::the();
 | |
|     return NetworkAdapter::from_ipv4_address(IPv4Address(192, 168, 5, 2));
 | |
| }
 | 
