IHttpDirectApp

Package: inet.applications.httptools.common

IHttpDirectApp

module interface

Interface for HTTP server and browser models that communicate directly, without lower layer protocols. This module is intended for use with the DirectHost module and plugs in as a tcpApp.

See also: HttpServerBase

See also: HttpServer

See also: DirectHost

Author: Kristjan V. Jonsson

Inheritance diagram

The following diagram shows inheritance relationships for this type. Unresolved types are missing from the diagram.

Implemented by

Name Type Description
HttpBrowserDirect simple module

This component is the direct message passing version of the browser simulation component. It is derived from HttpBrowserBase. Use this component with the DirectHost container module.

HttpServerDirect simple module

A Web server module for OMNeT++ simulations and direct message passing between modules. This module is intended for use with the DirectHost module and plugs in as a tcpApp.

HttpServerDirectEvilA simple module

Demonstrates subclassing the server to create a custom site. This site is an attacker -- a puppetmaster -- which serves HTML pages containing attack code. In this case, we are simulating JavaScript attack code which prompts the unsuspecting browser to request a number of images from a victim site. Delays are specified to simulate hiding the attack from the browser user by use of JavaScript timeouts or similar mechanisms. The generateBody virtual function is redefined to create a page containing the attack code.

HttpServerDirectEvilB simple module

Demonstrates subclassing the server to create a custom site. This site is an attacker -- a puppetmaster -- which serves HTML pages containing attack code. In this case, we are simulating JavaScript attack code which prompts the unsuspecting browser to issue a number of requests for non-existing resources (random URLS) to the victim site. Delays are specified to simulate hiding the attack from the browser user by use of JavaScript timeouts or similar mechanisms. The generateBody virtual function is redefined to create a page containing the attack code.

Used in compound modules

Name Type Description
DirectHost compound module

Simple host for the HttpTools project. The module is derived from the INET StandardHost module. All network infrastructure modules were removed; the node is a simple container for tcpApps. Suitable apps are the HttpBrowserDirect and HttpServerDirect modules from HttpTools. See the INET documentation for StandardHost and the provided examples on how to assign tcpApps to the module.

Parameters

Name Type Default value Description
linkSpeed double

Used to model transmission delays.

Source code

//
// Interface for HTTP server and browser models that communicate directly,
// without lower layer protocols. This module is intended for use with the
// DirectHost module and plugs in as a tcpApp.
//
// @see HttpServerBase
// @see HttpServer
// @see DirectHost
//
// @author  Kristjan V. Jonsson
//
moduleinterface IHttpDirectApp
{
    parameters:
        double linkSpeed @unit(bps);  // Used to model transmission delays.
    gates:
        input httpIn @directIn;
}

File: src/inet/applications/httptools/common/IHttpDirectApp.ned