<Page>
                                                                    Exhibit 10.4

                           INET TECHNOLOGIES, INC.
                      1998 EMPLOYEE STOCK PURCHASE PLAN

    I.    PURPOSE OF THE PLAN

          This Employee Stock Purchase Plan is intended to promote the
interests of Inet Technologies, Inc., a Delaware corporation, by providing
eligible employees with the opportunity to acquire a proprietary interest in
the Corporation through participation in a payroll-deduction based employee
stock purchase plan designed to qualify under Section 423 of the Code.

          Capitalized terms herein shall have the meanings assigned to such
terms in the attached Appendix.

    II.   ADMINISTRATION OF THE PLAN

          The Plan Administrator shall have full authority to interpret and
construe any provision of the Plan and to adopt such rules and regulations
for administering the Plan as it may deem necessary in order to comply with
the requirements of Code Section 423.  Decisions of the Plan Administrator
shall be final and binding on all parties having an interest in the Plan.

    III.  STOCK SUBJECT TO PLAN

          A.  The stock purchasable under the Plan shall be shares of
authorized but unissued or reacquired Common Stock, including shares of
Common Stock purchased on the open market.  The maximum number of shares of
Common Stock which may be issued over the term of the Plan shall not exceed
Seven Hundred Fifty Thousand (750,000) shares.

          B.  Should any change be made to the Common Stock by reason of any
stock split, stock dividend, recapitalization, combination of shares,
exchange of shares or other change affecting the outstanding Common Stock as
a class without the Corporation's receipt of consideration, appropriate
adjustments shall be made to (i) the maximum number and class of securities
issuable under the Plan, (ii) the maximum number and class of securities
purchasable per Participant on any one Purchase Date and (iii) the number and
class of securities and the price per share in effect under each outstanding
purchase right in order to prevent the dilution or enlargement of benefits
thereunder.

    IV.   OFFERING PERIODS

          A.  Shares of Common Stock shall be offered for purchase under the
Plan through a series of successive offering periods until such time as (i)
the maximum number of shares of Common Stock available for issuance under the
Plan shall have been purchased or (ii) the Plan shall have been sooner
terminated.

          B.  Each offering period shall be of such duration (not to exceed
twenty-four (24) months) as determined by the Plan Administrator prior to the
start date of such offering period.  However, the initial offering period
shall commence at the Effective Time

<Page>

and terminate on the last business day in July 2001.  The next offering
period shall commence on the first business day in August 2001, and
subsequent offering periods shall commence as designated by the Plan
Administrator.

          C.  Each offering period shall be comprised of a series of one or
more successive Purchase Intervals.  Purchase Intervals shall run from the
first business day in February each year to the last business day in July of
the same year and from the first business day in August each year to the last
business day in January of the following year.  However, the first Purchase
Interval in effect under the initial offering period shall commence at the
Effective Time and terminate on the last business day in January 2000.

          D.  Should the Fair Market Value per share of Common Stock on any
Purchase Date within an offering period be less than the Fair Market Value
per share of Common Stock on the start date of that offering period, then
that offering period shall automatically terminate immediately after the
purchase of shares of Common Stock on such Purchase Date, and a new offering
period shall commence on the next business day following such Purchase Date.
The new offering period shall have a duration of twenty (24) months, unless a
shorter duration is established by the Plan Administrator within five (5)
business days following the start date of that offering period.

    V.    ELIGIBILITY

          A.  Each individual who is an Eligible Employee on the start date
of the initial offering period under the Plan may enter that offering period
on such start date or on any subsequent Semi-Annual Entry Date within that
offering period, provided he or she remains an Eligible Employee.

          B.  Each individual who is an Eligible Employee on the start date
of any subsequent offering period under the Plan may enter that offering
period on such start date or on any subsequent Semi-Annual Entry Date within
that offering period, provided in each case that he or she has completed at
least ninety (90) days of continuous employment with the Corporation or a
Corporate Affiliate prior to such date.

          C.  Each individual who first becomes an Eligible Employee after
the start date of an offering period may enter that offering period on any
subsequent Semi-Annual Entry Date within that offering period on which he or
she is an Eligible Employee, provided he or she has completed at least ninety
(90) days of continuous employment with the Corporation or a Corporate
Affiliate prior to such Semi-Annual Entry Date.

          D.  The date an individual enters an offering period shall be
designated his or her Entry Date for purposes of that offering period.

          E.  To participate in the Plan for a particular offering period,
the Eligible Employee must complete the enrollment forms prescribed by the
Plan Administrator (including a stock purchase agreement and a payroll
deduction authorization) and file such forms with the Plan Administrator (or
its designate) on or before his or her scheduled Entry Date.

                                       2
<Page>

    VI.   PAYROLL DEDUCTIONS

          A.  The payroll deduction authorized by the Participant for
purposes of acquiring shares of Common Stock during an offering period may be
any multiple of one percent (1%) of the Base Salary paid to the Participant
during each Purchase Interval within that offering period, up to a maximum of
fifteen percent (15%).  The deduction rate so authorized shall continue in
effect throughout the offering period, except to the extent such rate is
changed in accordance with the following guidelines:

              (i)  The Participant may, at any time during the offering period,
    reduce his or her rate of payroll deduction to become effective as soon as
    possible after filing the appropriate form with the Plan Administrator.
    The Participant may not, however, effect more than one (1) such reduction
    per Purchase Interval.

              (ii)  The Participant may, prior to the commencement of any new
    Purchase Interval within the offering period, increase the rate of his or
    her payroll deduction by filing the appropriate form with the Plan
    Administrator.  The new rate (which may not exceed the fifteen percent
    (15%) maximum) shall become effective on the start date of the first
    Purchase Interval following the filing of such form.

          B.  Payroll deductions shall begin on the first pay day following
the Participant's Entry Date into the offering period and shall (unless
sooner terminated by the Participant) continue through the pay day ending
with or immediately prior to the last day of that offering period.  The
amounts so collected shall be credited to the Participant's book account
under the Plan, but no interest shall be paid on the balance from time to
time outstanding in such account.  The amounts collected from the Participant
shall not be required to be held in any segregated account or trust fund and
may be commingled with the general assets of the Corporation and used for
general corporate purposes.

          C.  Payroll deductions shall automatically cease upon the
termination of the Participant's purchase right in accordance with the
provisions of the Plan.

          D.  The Participant's acquisition of Common Stock under the Plan on
any Purchase Date shall neither limit nor require the Participant's
acquisition of Common Stock on any subsequent Purchase Date, whether within
the same or a different offering period.

    VII.  PURCHASE RIGHTS

          A.  GRANT OF PURCHASE RIGHT.  A Participant shall be granted a
separate purchase right for each offering period in which he or she
participates.  The purchase right shall be granted on the Participant's Entry
Date into the offering period and shall provide the Participant with the
right to purchase shares of Common Stock, in a series of successive
installments over the remainder of such offering period, upon the terms set
forth below.  The Participant shall execute a stock purchase agreement
embodying such terms and such other provisions (not inconsistent with the
Plan) as the Plan Administrator may deem advisable.

                                       3
<Page>

          Under no circumstances shall purchase rights be granted under the
Plan to any Eligible Employee if such individual would, immediately after the
grant, own (within the meaning of Code Section 424(d)) or hold outstanding
options or other rights to purchase, stock possessing five percent (5%) or
more of the total combined voting power or value of all classes of stock of
the Corporation or any Corporate Affiliate.

          B.  EXERCISE OF THE PURCHASE RIGHT.  Each purchase right shall be
automatically exercised in installments on each successive Purchase Date
within the offering period, and shares of Common Stock shall accordingly be
purchased on behalf of each Participant (other than Participants whose
payroll deductions have previously been refunded pursuant to the Termination
of Purchase Right provisions below) on each such Purchase Date.  The purchase
shall be effected by applying the Participant's payroll deductions for the
Purchase Interval ending on such Purchase Date to the purchase of whole
shares of Common Stock at the purchase price in effect for the Participant
for that Purchase Date.

          C.  PURCHASE PRICE.  The purchase price per share at which Common
Stock will be purchased on the Participant's behalf on each Purchase Date
within the offering period shall be equal to eighty-five percent (85%) of the
lower of (i) the Fair Market Value per share of Common Stock on the
Participant's Entry Date into that offering period or (ii) the Fair Market
Value per share of Common Stock on that Purchase Date.

          D.  NUMBER OF PURCHASABLE SHARES.  The number of shares of Common
Stock purchasable by a Participant on each Purchase Date during the offering
period shall be the number of whole shares obtained by dividing the amount
collected from the Participant through payroll deductions during the Purchase
Interval ending with that Purchase Date by the purchase price in effect for
the Participant for that Purchase Date.  However, the maximum number of
shares of Common Stock purchasable per Participant on any one Purchase Date
shall not exceed One Thousand (1,000) shares, subject to periodic adjustments
in the event of certain changes in the Corporation's capitalization. In
addition, the maximum aggregate number of shares of Common Stock purchasable
by all Participants on any one Purchase Date shall not exceed One Hundred
Eighty-Seven Thousand Five Hundred (187,500) shares, subject to periodic
adjustments in the event of certain changes in the Corporation's
capitalization.

          E.  EXCESS PAYROLL DEDUCTIONS.  Any payroll deductions not applied
to the  purchase of shares of Common Stock on any Purchase Date because they
are not sufficient to purchase a whole share of Common Stock shall be held
for the purchase of Common Stock on the next Purchase Date.  However, any
payroll deductions not applied to the purchase of Common Stock by reason of
the limitation on the maximum number of shares purchasable on the Purchase
Date shall be promptly refunded.

          F.  TERMINATION OF PURCHASE RIGHT.  The following provisions shall
govern the termination of outstanding purchase rights:

              (i)  A Participant may, at any time prior to the next scheduled
    Purchase Date in the offering period, terminate his or her outstanding
    purchase right by filing the appropriate form with the Plan Administrator
    (or its designate), and no further payroll deductions shall be

                                       4
<Page>

    collected from the Participant with respect to the terminated purchase
    right.  Any payroll deductions collected during the Purchase Interval in
    which such termination occurs shall, at the Participant's election, be
    immediately refunded or held for the purchase of shares on the next Purchase
    Date.  If no such election is made at the time such purchase right is
    terminated, then the payroll deductions collected with respect to the
    terminated right shall be refunded as soon as possible.

              (ii)  The termination of such purchase right shall be
    irrevocable, and the Participant may not subsequently rejoin the offering
    period for which the terminated purchase right was granted.  In order to
    resume participation in any subsequent offering period, such individual
    must re-enroll in the Plan (by making a timely filing of the prescribed
    enrollment forms) on or before his or her scheduled Entry Date into that
    offering period.

              (iii)  Should the Participant cease to remain an Eligible
    Employee for any reason (including death, disability or change in status)
    while his or her purchase right remains outstanding, then that purchase
    right shall immediately terminate, and all of the Participant's payroll
    deductions for the Purchase Interval in which the purchase right so
    terminates shall be immediately refunded.  However, should the
    Participant cease to remain in active service by reason of an approved
    unpaid leave of absence, then the Participant shall have the right,
    exercisable up until the last business day of the Purchase Interval in
    which such leave commences, to (a) withdraw all the payroll deductions
    collected to date on his or her behalf for that Purchase Interval or (b)
    have such funds held for the purchase of shares on his or her behalf on
    the next scheduled Purchase Date.  In no event, however, shall any
    further payroll deductions be collected on the Participant's behalf
    during such leave.  Upon the Participant's return to active service (i)
    within ninety (90) days following the commencement of such leave or, (ii)
    prior to the expiration of any longer period for which such Participant's
    right to reemployment with the Corporation is guaranteed by either
    statute or contract, his or her payroll deductions under the Plan shall
    automatically resume at the rate in effect at the time the leave began.
    However, should the Participant's leave of absence exceed ninety (90)
    days and his or her re-employment rights not be guaranteed by either
    statute or contract, then the Participant's status as an Eligible
    Employee will be deemed to terminate on the ninety-first (91st) day of
    that leave, and such Participant's purchase right for the offering period
    in which that leave began shall thereupon terminate.  An individual who
    returns to active employment following such a leave shall be treated as a
    new Employee for purposes of the Plan and must, in order to resume
    participation in the Plan, re-enroll in the Plan (by making a timely
    filing of the prescribed enrollment forms) on or before his or her
    scheduled Entry Date into the offering period.

          G.  CORPORATE TRANSACTION.  Each outstanding purchase right shall
automatically be exercised, immediately prior to the effective date of any
Corporate Transaction, by applying the payroll deductions of each Participant
for the Purchase Interval in which such Corporate Transaction occurs to the
purchase of whole shares of

                                       5
<Page>

Common Stock at a purchase price per share equal to eighty-five percent (85%)
of the LOWER of (i) the Fair Market Value per share of Common Stock on the
Participant's Entry Date into the offering period in which such Corporate
Transaction occurs or (ii) the Fair Market Value per share of Common Stock
immediately prior to the effective date of such Corporate Transaction.
However, the applicable limitations on the number of shares of Common Stock
purchasable per Participant and in the aggregate shall continue to apply to
any such purchase.

          The Corporation shall use its best efforts to provide at least ten
(10)-days prior written notice of the occurrence of any Corporate
Transaction, and Participants shall, following the receipt of such notice,
have the right to terminate their outstanding purchase rights prior to the
effective date of the Corporate Transaction.

          H.  PRORATION OF PURCHASE RIGHTS.  Should the total number of
shares of Common Stock to be purchased pursuant to outstanding purchase
rights on any particular date exceed the number of shares then available for
issuance under the Plan, the Plan Administrator shall make a pro-rata
allocation of the available shares on a uniform and nondiscriminatory basis,
and the payroll deductions of each Participant, to the extent in excess of
the aggregate purchase price payable for the Common Stock pro-rated to such
individual, shall be refunded.

          I.  ASSIGNABILITY.  The purchase right shall be exercisable only by
the Participant and shall not be assignable or transferable by the
Participant.

          J.  STOCKHOLDER RIGHTS.  A Participant shall have no stockholder
rights with respect to the shares subject to his or her outstanding purchase
right until the shares are purchased on the Participant's behalf in
accordance with the provisions of the Plan and the Participant has become a
holder of record of the purchased shares.

    VIII.  ACCRUAL LIMITATIONS

          A.  No Participant shall be entitled to accrue rights to acquire
Common Stock pursuant to any purchase right outstanding under this Plan if
and to the extent such accrual, when aggregated with (i) rights to purchase
Common Stock accrued under any other purchase right granted under this Plan
and (ii) similar rights accrued under other employee stock purchase plans
(within the meaning of Code Section 423) of the Corporation or any Corporate
Affiliate, would otherwise permit such Participant to purchase more than
Twenty-Five Thousand Dollars ($25,000) worth of stock of the Corporation or
any Corporate Affiliate (determined on the basis of the Fair Market Value per
share on the date or dates such rights are granted) for each calendar year
such rights are at any time outstanding.

          B.  For purposes of applying such accrual limitations to the
purchase rights granted under the Plan, the following provisions shall be in
effect:

              (i)  The right to acquire Common Stock under each outstanding
    purchase right shall accrue in a series of installments on each successive
    Purchase Date during the offering period on which such right remains
    outstanding.

                                       6
<Page>

              (ii)  No right to acquire Common Stock under any outstanding
    purchase right shall accrue to the extent the Participant has already
    accrued in the same calendar year the right to acquire Common Stock under
    one (1) or more other purchase rights at a rate equal to Twenty-Five
    Thousand Dollars ($25,000) worth of Common Stock (determined on the basis
    of the Fair Market Value per share on the date or dates of grant) for each
    calendar year such rights were at any time outstanding.

          C.  If by reason of such accrual limitations, any purchase right of
a Participant does not accrue for a particular Purchase Interval, then the
payroll deductions which the Participant made during that Purchase Interval
with respect to such purchase right shall be promptly refunded.

          D.  In the event there is any conflict between the provisions of
this Articleand one or more provisions of the Plan or any instrument issued
thereunder, the provisions of this Articleshall be controlling.

    IX.  EFFECTIVE DATE AND TERM OF THE PLAN

          A.  The Plan was adopted by the Board on July 22, 1998 and shall
become effective at the Effective Time, PROVIDED no purchase rights granted
under the Plan shall be exercised, and no shares of Common Stock shall be
issued hereunder, until (i)the Plan shall have been approved by the
stockholders of the Corporation and (ii)the Corporation shall have complied
with all applicable requirements of the 1933 Act (including the registration
of the shares of Common Stock issuable under the Plan on a Form S-8
registration statement filed with the Securities and Exchange Commission),
all applicable listing requirements of any stock exchange (or the Nasdaq
National Market, if applicable) on which the Common Stock is listed for
trading and all other applicable requirements established by law or
regulation.  In the event such stockholder approval is not obtained, or such
compliance is not effected, within twelve (12) months after the date on which
the Plan is adopted by the Board, the Plan shall terminate and have no
further force or effect, and all sums collected from Participants during the
initial offering period hereunder shall be refunded.

          B.  Unless sooner terminated by the Board, the Plan shall terminate
upon the EARLIEST of (i)the last business day in July 2009, (ii) the date on
which all shares available for issuance under the Plan shall have been sold
pursuant to purchase rights exercised under the Plan or (iii) the date on
which all purchase rights are exercised in connection with a Corporate
Transaction.  No further purchase rights shall be granted or exercised, and
no further payroll deductions shall be collected, under the Plan following
such termination.

    X.    AMENDMENT/TERMINATION OF THE PLAN

          A.  The Board may alter, amend, suspend or terminate the Plan at
any time to become effective immediately following the close of any Purchase
Interval.  However, the Plan may be amended or terminated immediately upon
Board action, if and to the extent necessary to assure that the Corporation
will not recognize, for financial reporting purposes, any compensation
expense in connection with the shares of Common

                                       7
<Page>

Stock offered for purchase under the Plan, should the financial accounting
rules applicable to the Plan at the Effective Time be subsequently revised so
as to require the recognition of compensation expense in the absence of such
amendment or termination.

          B.   In no event may the Board effect any of the following
amendments or revisions to the Plan without the approval of the Corporation's
stockholders: (i) increase the number of shares of Common Stock issuable
under the Plan or the maximum number of shares purchasable per Participant on
any one Purchase Date, except for permissible adjustments in the event of
certain changes in the Corporation's capitalization, (ii) alter the purchase
price formula so as to reduce the purchase price payable for the shares of
Common Stock purchasable under the Plan or (iii) modify eligibility
requirements for participation in the Plan.

    XI.  GENERAL PROVISIONS

          A.  Nothing in the Plan shall confer upon the Participant any right
to continue in the employ of the Corporation or any Corporate Affiliate for
any period of specific duration or interfere with or otherwise restrict in
any way the rights of the Corporation (or any Corporate Affiliate employing
such person) or of the Participant, which rights are hereby expressly
reserved by each, to terminate such person's employment  at any time for any
reason, with or without cause.

          B.  All costs and expenses incurred in the administration of the
Plan shall be paid by the Corporation; however, each Plan Participant shall
bear all costs and expenses incurred by such individual in the sale or other
disposition of any shares purchased under the Plan.

          C.  The provisions of the Plan shall be governed by the laws of the
State of Texas without resort to that State's conflict-of-laws rules.























                                       8
<Page>

                                   SCHEDULE A

                           CORPORATIONS PARTICIPATING IN
                           EMPLOYEE STOCK PURCHASE PLAN
                             AS OF THE EFFECTIVE TIME

                             Inet Technologies, Inc.

                      INET Global, Limited (United Kingdom)

<Page>

                                   APPENDIX

    The following definitions shall be in effect under the Plan:

    A.  BASE SALARY shall mean the regular base salary paid to a Participant
by one or more Participating Corporations during such individual's period of
participation in one or more offering periods under the Plan, calculated
before deduction of (A) any income or employment tax withholdings or (B) any
pre-tax contributions made by the Participant to any Code Section 401(k)
salary deferral plan or any Code Section 125 cafeteria benefit program now or
hereafter established by the Corporation or any Corporate Affiliate. The
following items of compensation shall NOT be included in Base Salary:  (i)
all overtime payments, bonuses, commissions (other than those functioning as
base salary equivalents), profit-sharing distributions and other
incentive-type payments and (ii) any and all contributions (other than Code
Section 401(k) or Code Section 125 contributions) made on the Participant's
behalf by the Corporation or any Corporate Affiliate under any employee
benefit or welfare plan now or hereafter established.

    B.  BOARD shall mean the Corporation's Board of Directors.

    C.  CODE shall mean the Internal Revenue Code of 1986, as amended.

    D.  COMMON STOCK shall mean the Corporation's common stock.

    E.  CORPORATE AFFILIATE shall mean any parent or subsidiary corporation
of the Corporation (as determined in accordance with Code Section 424),
whether now existing or subsequently established.

    F.  CORPORATE TRANSACTION shall mean either of the following
stockholder-approved transactions to which the Corporation is a party:

        (i)  a merger or consolidation in which securities possessing more
    than fifty percent (50%) of the total combined voting power of the
    Corporation's outstanding securities are transferred to a person or persons
    different from the persons holding those securities immediately prior to
    such transaction, or

        (ii)  the sale, transfer or other disposition of all or substantially
    all of the assets of the Corporation in complete liquidation or dissolution
    of the Corporation.

    G.  CORPORATION shall mean Inet Technologies, Inc., a Delaware
corporation, and any corporate successor to all or substantially all of the
assets or voting stock of Inet Technologies, Inc. which shall by appropriate
action adopt the Plan.

    H.  EFFECTIVE TIME shall mean the time at which the Underwriting
Agreement is executed and finally priced.  Any Corporate Affiliate which
becomes a

                                      A-1
<Page>

Participating Corporation after such Effective Time shall designate a
subsequent Effective Time with respect to its employee-Participants.

    I.  ELIGIBLE EMPLOYEE shall mean any person who is employed by a
Participating Corporation on a basis under which he or she is regularly
expected to render more than twenty (20) hours of service per week for more
than five (5) months per calendar year for earnings considered wages under
Code Section 3401(a).

    J.  ENTRY DATE shall mean the date an Eligible Employee first commences
participation in the offering period in effect under the Plan.  The earliest
Entry Date under the Plan shall be the Effective Time.

    K.  FAIR MARKET VALUE per share of Common Stock on any relevant date
shall be determined in accordance with the following provisions:

        (i)  If the Common Stock is at the time traded on the Nasdaq National
    Market, then the Fair Market Value shall be the closing selling price per
    share of Common Stock on the date in question, as such price is reported by
    the National Association of Securities Dealers on the Nasdaq National Market
    or any successor system.  If there is no closing selling price for the
    Common Stock on the date in question, then the Fair Market Value shall be
    the closing selling price on the last preceding date for which such
    quotation exists.

        (ii)  If the Common Stock is at the time listed on any Stock
    Exchange, then the Fair Market Value shall be the closing selling price per
    share of Common Stock on the date in question on the Stock Exchange
    determined by the Plan Administrator to be the primary market for the Common
    Stock, as such price is officially quoted in the composite tape of
    transactions on such exchange.  If there is no closing selling price for the
    Common Stock on the date in question, then the Fair Market Value shall be
    the closing selling price  on the last preceding date for which such
    quotation exists.

        (iii)  For purposes of the initial offering period which begins at
    the Effective Time, the Fair Market Value shall be deemed to be equal to
    the price per share at which the Common Stock is sold in the initial public
    offering pursuant to the Underwriting Agreement.

    L.  1933 ACT shall mean the Securities Act of 1933, as amended.

    M.  PARTICIPANT shall mean any Eligible Employee of a Participating
Corporation who is actively participating in the Plan.

    N.  PARTICIPATING CORPORATION shall mean the Corporation and such
Corporate Affiliate or Affiliates as may be authorized from time to time by
the Board to extend the benefits of the Plan to their Eligible Employees.
The Participating Corporations in the Plan are listed in attached Schedule A.

                                       A-2
<Page>

    O.  PLAN shall mean the Corporation's 1998 Employee Stock Purchase Plan,
as set forth in this document.

    P.  PLAN ADMINISTRATOR shall mean the committee of two (2) or more Board
members appointed by the Board to administer the Plan.

    Q.  PURCHASE DATE shall mean the last business day of each Purchase
Interval.  The initial Purchase Date shall be January 31, 2000.

    R.  PURCHASE INTERVAL shall mean each successive six (6)-month period
within the offering period at the end of which there shall be purchased
shares of Common Stock on behalf of each Participant.

    S.  SEMI-ANNUAL ENTRY DATE shall mean the first business day in February
and August each year on which an Eligible Employee may first enter an
offering period.

    T.  STOCK EXCHANGE shall mean either the American Stock Exchange or the
New York Stock Exchange.

    U.  UNDERWRITING AGREEMENT shall mean the agreement between the
Corporation and the underwriter or underwriters managing the initial public
offering of the Common Stock.
























                                      A-3