Traffic Functions
Prev | Chapter 7. Support Function Reference | Next

## Traffic Functions

Traffic functions generate powerline traffic in various ways. Some send traffic direct from the host to each device while others use the `VS_FR_LBK` message to echo Ethernet frames back to the sender.

### CrossTraffic1

`signed CrossTraffic1(` | plc`)`; |

`struct plc * plc`;

Instruct a powerline device to send a generic Ethernet frame to another powerline device for a fixed period of time in order to set the `TX` rate on the source device and the `RX` rate on the destination device. The source and destination address are specified in `plc->MAC` and `plc->RDA`, respectively, and the duration is specified in `plc->timeperiod`. This function is similar to function CrossTraffic2 but the source and destination addresses are reversed. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file CrossTraffic1.c.

### CrossTraffic2

`signed CrossTraffic2(` | plc`)`; |

`struct plc * plc`;

Instruct a powerline device to send a generic Ethernet frame to another powerline device for a fixed period of time in order to set the `TX` rate on the source device and the `RX` rate on the destination device. The source and destination address are specified in `plc->RDA` and `plc->MAC`, respectively, and the duration is specified in `plc->timeperiod`. This function is similar to function CrossTraffic1 but the source and destination addresses are reversed. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file CrossTraffic2.c.

### LocalTraffic1

`signed LocalTraffic1(` | plc`)`; |

`struct plc * plc`;

Send a fixed number of generic frames from the local host a remote powerline device in order to set the `TX` rate on the local powerline device and the `RX` rate on the remote powerline device. The local and remote device address are specified in `plc->MAC` and `plc->RDA`, respectively, and the count is specified in `plc->count`. This function is similar to function LocalTraffic2 which instructs a remote device to echo frames back to the local device. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file LocalTraffic1.c.

### LocalTraffic2

`signed LocalTraffic2(` | plc`)`; |

`struct plc * plc`;

Instruct a remote powerline device to echo generic Ethernet frames back to the local host for a fixed period of time in order to set the `TX` rate on the remote powerline device and the `RX` rate on the local powerline device. The local and remote device address are specified in `plc->MAC` and `plc->RDA`, respectively, and the count is specified in `plc->count`. This function is useful when there is no easy way to send traffic from the remote host. This function complements function LocalTraffic1 which send frames from the local device to a remote device. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file LocalTraffic2.c.

### NetworkTraffic1

`signed NetworkTraffic1(` | plc`)`; |

`struct plc * plc`;

This function is an alternative to function NetworkTraffic2 which uses Qualcomm Version `1` management messages to determine network topology. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file NetworkTraffic1.c.

This function use `VS_SW_INFO` and `VS_NW_INFO` messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic1, it does not generate traffic between various remote devices.

### NetworkTraffic2

`signed NetworkTraffic2(` | plc`)`; |

`struct plc * plc`;

This function is an alternative to function NetworkTraffic1 which uses Qualcomm Version `0` management messages to determine network topology. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file NetworkTraffic2.c.

### Traffic1

`signed Traffic1(` | plc`)`; |

`struct plc * plc`;

This function is an alternative to function Traffic2 which uses Qualcomm Version `1` management messages to determine network topology. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file Traffic1.c.

This function use `VS_SW_INFO` and `VS_NW_INFO` messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic1, it does not generate traffic between remote devices.

### Traffic2

`signed Traffic2(` | plc`)`; |

`struct plc * plc`;

This function is an alternative to function Traffic1 which uses Qualcomm Version `0` management messages to determine network topology. Structure `plc` is declared in file plc.h and defined in file plc.c. The function is declared in plc.h and defined in file Traffic2.c.

This function use `VS_SW_INFO` and `VS_NW_INFO` messages to discover powerline network topology then calls functions LocalTraffic1 and LocalTraffic2 to generate traffic between the local powerline device and each remote powerline device. Unlike function NetworkTraffic2, it does not generate traffic between remote devices.

Prev | Up | Next
Procrastination Functions | Home | SLAC Functions and Variables