En curso

C++ Scatter Gather Arrays

C++ Scatter Gather Arrays

Your program will work with Win32 scatter-gather arrays. (look up LPWSABUF structure in MSDN) Or, use appropriate Unix structure if you want to code in *nix.

Your program must:

1) Process a scatter-gather array element by element,

searching for a specific pattern. Please note that the

pattern may span several buffers. Use effective pattern

detection algorithms, just doing strcmp() will not be

acceptable !

2) As soon as the pattern is detected, replace everything

up to the end-of-line character with a specific string.

Respect buffer boundaries !

3) You are not allowed to deallocate/reallocate existing

buffers. You ARE allowed to allocate new buffers.

The pattern you will be searching for is "RCPT TO: "

The replacement string is "testtesttest"

Example:

HELO

USER test

PASS test

RCPT TO:User blahblah

QUIT

Your output should look like this

HELO

USER test

PASS test

RCPT TO:test

This is a part of an ongoing project, and we have a lot of

other much more rewarding projects in store, do this one

RIGHT and you will be awarded more contracts, much more

expensive than this one.

----->

Here is a few important points/clarifications:

1. Buffers contain binary data, they may also contain \0, \n, \t etc at any point.

So, they are not null terminated.

2. Pattern may span multiple buffers.

3. To make matters even more complicated :) both pattern AND replacement string may span multiple LPWSABUF structures

In other words, your input may look like this:

//scatter gather array 1

RC //buffer 1

PT //buffer 2

T //buffer 3

//scatter gather array 2

O: //buffer 1

Your routine will take in 1 (ONE) LPWSABUF at a time.

4. And now, a simplification. You don't need to do pattern replacement 'in place'. Instead, each time your

routine is called you'll allocate a new WSABUF structure and fill it with information from input structure

with everything that follows RCPT TO: till the end-of line replaced by replacement-string. In the new structure,

you are free to allocate as many buffers as you wish. Personally, I would just allocate 1 :)

Hope it helps. Again, you are NOT allowed to modify/deallocate existing buffers.

5. Using State Machine pattern matching or KMP algorithm is a must. I'd prefer state machine.

## Deliverables

1) Complete and fully-functional working program(s) in executable form as well as complete source code of all work done.

2) Deliverables must be in ready-to-run condition, as follows (depending on the nature of the deliverables):

a) For web sites or other server-side deliverables intended to only ever exist in one place in the Buyer's environment--Deliverables must be installed by the Seller in ready-to-run condition in the Buyer's environment.

b) For all others including desktop software or software the buyer intends to distribute: A software installation package that will install the software in ready-to-run condition on the platform(s) specified in this bid request.

3) All deliverables will be considered "work made for hire" under U.S. Copyright law. Buyer will receive exclusive and complete copyrights to all work purchased. (No GPL, GNU, 3rd party components, etc. unless all copyright ramifications are explained AND AGREED TO by the buyer on the site per the coder's Seller Legal Agreement).

## Platform

Win32 or Unix

Habilidades: Programación en C, Programación en C#, Ingeniería, Linux, Microsoft, MySQL, PHP, Arquitectura de software, Verificación de software, UNIX, Windows Desktop

Ver más: gather array, scatter gather, work for hire contracts, win32 programming, web pt, use of data structure in programming, use of algorithms in programming, unix programming environment, the unix programming environment, test algorithms, string searching in c, string searching algorithms, string searching algorithm, string searching, string pattern matching in c, string pattern matching algorithms, string pattern matching algorithm, string pattern matching, string pattern, string matching in c, string matching algorithms, string matching algorithm, string in data structure, string in c programming, string data structure

Información del empleador:
( 68 comentarios ) United States

ID de proyecto: #3307516

Adjudicado a:

radupc

See private message.

$7 USD en 5 días
(46 comentarios)
4.6

4 los freelancers están ofertando un promedio de $10 para este trabajo.

stratocode

See private message.

$4.25 USD en 5 días
(5 comentarios)
2.7
aquarius82

See private message.

$8.5 USD en 5 días
(1 comentario)
0.0
jkopvw

See private message.

$21.25 USD en 5 días
(0 comentarios)
0.0